Struct libunftp::auth::anonymous::AnonymousAuthenticator
source · pub struct AnonymousAuthenticator;
Expand description
Authenticator
implementation that simply allows everyone.
Example
use libunftp::auth::{Authenticator, AnonymousAuthenticator, DefaultUser};
let my_auth = AnonymousAuthenticator{};
assert_eq!(my_auth.authenticate("Finn", &"I ❤️ PB".into()).await.unwrap(), DefaultUser{});
Trait Implementations§
source§impl Authenticator<DefaultUser> for AnonymousAuthenticator
impl Authenticator<DefaultUser> for AnonymousAuthenticator
source§fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_username: &'life1 str,
_password: &'life2 Credentials
) -> Pin<Box<dyn Future<Output = Result<DefaultUser, AuthenticationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_username: &'life1 str,
_password: &'life2 Credentials
) -> Pin<Box<dyn Future<Output = Result<DefaultUser, AuthenticationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Authenticate the given user with the given credentials.
source§fn cert_auth_sufficient<'life0, 'life1, 'async_trait>(
&'life0 self,
_username: &'life1 str
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cert_auth_sufficient<'life0, 'life1, 'async_trait>(
&'life0 self,
_username: &'life1 str
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Tells whether its OK to not ask for a password when a valid client cert
was presented.
Auto Trait Implementations§
impl RefUnwindSafe for AnonymousAuthenticator
impl Send for AnonymousAuthenticator
impl Sync for AnonymousAuthenticator
impl Unpin for AnonymousAuthenticator
impl UnwindSafe for AnonymousAuthenticator
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more