AuthenticationProvider

Trait AuthenticationProvider 

Source
pub trait AuthenticationProvider: AuthenticationProviderClone {
    // Required method
    fn authenticate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        authentication: &'life1 Box<dyn Authentication>,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn UserDetails>, AuthenticationError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

An authentication provider executes the authentication for an Authentication object and returns either a object of UserDetails (implementation of the marker trait) or an AuthenticationError.

Required Methods§

Source

fn authenticate<'life0, 'life1, 'async_trait>( &'life0 self, authentication: &'life1 Box<dyn Authentication>, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn UserDetails>, AuthenticationError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Trait Implementations§

Source§

impl Clone for Box<dyn AuthenticationProvider>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§