Trait AuthenticationMethod

Source
pub trait AuthenticationMethod: Send + Sync {
    // Required methods
    fn id(&self) -> &'static str;
    fn authenticate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        authenticator: &'life1 mut dyn Authenticator,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Represents an interface to authenticate using some method

Required Methods§

Source

fn id(&self) -> &'static str

Returns a unique id to distinguish the method from other methods

Source

fn authenticate<'life0, 'life1, 'async_trait>( &'life0 self, authenticator: &'life1 mut dyn Authenticator, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Performs authentication using the authenticator to submit challenges and other information based on the authentication method

Implementors§