MfaStorage

Trait MfaStorage 

Source
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§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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)

Source

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,

Delete MFA challenge

Source

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,

Clean up expired challenges

Implementors§