pub trait MfaStorage: Send + Sync {
// Required methods
fn store_mfa_method<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 UserMfaMethod,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_user_mfa_methods<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserMfaMethod>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_mfa_method<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 UserMfaMethod,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_mfa_method<'life0, 'life1, 'async_trait>(
&'life0 self,
method_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn store_mfa_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
challenge: &'life1 MfaChallenge,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_mfa_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
challenge_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MfaChallenge>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_mfa_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
challenge: &'life1 MfaChallenge,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_mfa_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
challenge_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn cleanup_expired_challenges<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
MFA storage trait
Required Methods§
Sourcefn store_mfa_method<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 UserMfaMethod,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_mfa_method<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 UserMfaMethod,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store user MFA method
Sourcefn get_user_mfa_methods<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserMfaMethod>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user_mfa_methods<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserMfaMethod>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get user’s MFA methods
Sourcefn update_mfa_method<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 UserMfaMethod,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_mfa_method<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 UserMfaMethod,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update MFA method
Sourcefn delete_mfa_method<'life0, 'life1, 'async_trait>(
&'life0 self,
method_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_mfa_method<'life0, 'life1, 'async_trait>(
&'life0 self,
method_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete MFA method
Sourcefn store_mfa_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
challenge: &'life1 MfaChallenge,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_mfa_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
challenge: &'life1 MfaChallenge,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store MFA challenge
Sourcefn get_mfa_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
challenge_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MfaChallenge>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mfa_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
challenge_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MfaChallenge>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get MFA challenge
Sourcefn update_mfa_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
challenge: &'life1 MfaChallenge,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_mfa_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
challenge: &'life1 MfaChallenge,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update MFA challenge (for attempt counting)