Skip to main content

AuthUseCase

Trait AuthUseCase 

Source
pub trait AuthUseCase: Send + Sync {
    // Required methods
    fn set_password<'life0, 'async_trait>(
        &'life0 self,
        password: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validate_password<'life0, 'async_trait>(
        &'life0 mut self,
        password: String,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn register<'life0, 'async_trait>(
        &'life0 mut self,
        client_name: String,
        identity: String,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn authenticate<'life0, 'async_trait>(
        &'life0 mut self,
        client_name: String,
        identity: String,
    ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn password_required(&self) -> bool;
}

Required Methods§

Source

fn set_password<'life0, 'async_trait>( &'life0 self, password: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn validate_password<'life0, 'async_trait>( &'life0 mut self, password: String, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn register<'life0, 'async_trait>( &'life0 mut self, client_name: String, identity: String, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn authenticate<'life0, 'async_trait>( &'life0 mut self, client_name: String, identity: String, ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn password_required(&self) -> bool

Implementors§