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 for DefaultUser
impl PartialEq 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.
impl Eq for DefaultUser
impl StructuralEq for DefaultUser
impl StructuralPartialEq for DefaultUser
Auto Trait Implementations§
impl RefUnwindSafe for DefaultUser
impl Send for DefaultUser
impl Sync for DefaultUser
impl Unpin for DefaultUser
impl UnwindSafe for DefaultUser
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more