Trait PasswordVerifier

Source
pub trait PasswordVerifier: Send + Sync {
    // Required methods
    fn verify_password<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        username: &'life1 str,
        password: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn hash_password<'life0, 'life1, 'async_trait>(
        &'life0 self,
        password: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for password verification.

Required Methods§

Source

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

Verify a password against a hash.

Source

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

Hash a password.

Implementors§