pub trait AuthenticationProvider: Send + Sync {
// Required methods
fn method(&self) -> &str;
fn create(
&self,
rng: &Rng,
config: &HashMap<String, String>,
) -> Result<HashMap<String, String>>;
fn authenticate(
&self,
stored: &HashMap<String, String>,
credentials: &HashMap<String, String>,
) -> Result<AuthStep>;
// Provided method
fn verify_challenge(
&self,
_stored: &HashMap<String, String>,
_challenge: &HashMap<String, String>,
_credentials: &HashMap<String, String>,
) -> Result<AuthStep> { ... }
}Required Methods§
fn method(&self) -> &str
fn create( &self, rng: &Rng, config: &HashMap<String, String>, ) -> Result<HashMap<String, String>>
fn authenticate( &self, stored: &HashMap<String, String>, credentials: &HashMap<String, String>, ) -> Result<AuthStep>
Provided Methods§
fn verify_challenge( &self, _stored: &HashMap<String, String>, _challenge: &HashMap<String, String>, _credentials: &HashMap<String, String>, ) -> Result<AuthStep>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".