Skip to main content

CredentialsProvider

Trait CredentialsProvider 

Source
pub trait CredentialsProvider: Send + Sync {
    type Credentials;

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

Trait for a Credentials-based provider (e.g., Email/Password).

Required Associated Types§

Required Methods§

Source

fn authenticate<'life0, 'async_trait>( &'life0 self, creds: Self::Credentials, ) -> Pin<Box<dyn Future<Output = Result<Identity, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Validate credentials and return an Identity.

Implementors§