Skip to main content

BasicAuthenticator

Trait BasicAuthenticator 

Source
pub trait BasicAuthenticator: Send + Sync {
    type Identity;

    // Required method
    fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        username: &'life1 str,
        password: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Identity>, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for a provider that validates username and password (Basic Auth).

Required Associated Types§

Source

type Identity

The type of identity returned by this authenticator.

Required Methods§

Source

fn authenticate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, username: &'life1 str, password: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Identity>, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Validate the credentials.

Implementors§