Trait UserLookup

Source
pub trait UserLookup: Send + Sync {
    // Required methods
    fn lookup_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        username: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<UserInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn requires_mfa<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for user lookup operations.

Required Methods§

Source

fn lookup_user<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<UserInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Look up a user by username.

Source

fn requires_mfa<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check if a user requires MFA.

Implementors§