Skip to main content

AuthenticationProvider

Trait AuthenticationProvider 

Source
pub trait AuthenticationProvider: Send + Sync {
    // Required methods
    fn method(&self) -> &str;
    fn create(
        &self,
        config: &HashMap<String, String>,
    ) -> Result<HashMap<String, String>>;
    fn validate(
        &self,
        stored: &HashMap<String, String>,
        credential: &str,
    ) -> Result<bool>;
}

Required Methods§

Source

fn method(&self) -> &str

Source

fn create( &self, config: &HashMap<String, String>, ) -> Result<HashMap<String, String>>

Source

fn validate( &self, stored: &HashMap<String, String>, credential: &str, ) -> Result<bool>

Implementors§