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§
type Credentials
Required Methods§
Sourcefn 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,
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.