pub trait Authenticator<User>: Sync + Send + Debug where
    User: UserDetail
{ fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        username: &'life1 str,
        creds: &'life2 Credentials
    ) -> Pin<Box<dyn Future<Output = Result<User, AuthenticationError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: '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
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
fn name(&self) -> &str { ... } }
Expand description

Defines the requirements for Authentication implementations

Required methods

Authenticate the given user with the given credentials.

Provided methods

Tells whether its OK to not ask for a password when a valid client cert was presented.

Implement to set the name of the authenticator. By default it returns the type signature.

Implementors