Struct libunftp::auth::DefaultUser
source · pub struct DefaultUser;
Expand description
DefaultUser is a default implementation of the UserDetail
trait that doesn’t hold any user
information. Having a default implementation like this allows for quicker prototyping with
libunftp because otherwise the library user would have to implement the UserDetail
trait first.
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.
source§impl Debug for DefaultUser
impl Debug for DefaultUser
source§impl Display for DefaultUser
impl Display for DefaultUser
source§impl PartialEq<DefaultUser> for DefaultUser
impl PartialEq<DefaultUser> for DefaultUser
source§fn eq(&self, other: &DefaultUser) -> bool
fn eq(&self, other: &DefaultUser) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl UserDetail for DefaultUser
impl UserDetail for DefaultUser
source§fn account_enabled(&self) -> bool
fn account_enabled(&self) -> bool
Tells if this subject’s account is enabled. This default implementation simply returns true.