pub trait Authenticator<User>: Sync + Send + Debug
where User: UserDetail,
{ // Required method 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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; // Provided methods 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 name(&self) -> &str { ... } }
Expand description

Defines the requirements for Authentication implementations

Required Methods§

source

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Authenticate the given user with the given credentials.

Provided Methods§

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,

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

source

fn name(&self) -> &str

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

Implementors§