Skip to main content

AuthTwoFactor

Trait AuthTwoFactor 

Source
pub trait AuthTwoFactor:
    Clone
    + Send
    + Sync
    + Serialize
    + Debug
    + 'static {
    // Required methods
    fn id(&self) -> Cow<'_, str>;
    fn secret(&self) -> &str;
    fn backup_codes(&self) -> &str;
    fn user_id(&self) -> Cow<'_, str>;

    // Provided methods
    fn verified(&self) -> Option<bool> { ... }
    fn failed_verification_count(&self) -> Option<f64> { ... }
    fn locked_until(&self) -> Option<DateTime<Utc>> { ... }
}
Expand description

Trait representing a two-factor authentication entity.

Required Methods§

Source

fn id(&self) -> Cow<'_, str>

Source

fn secret(&self) -> &str

Source

fn backup_codes(&self) -> &str

Source

fn user_id(&self) -> Cow<'_, str>

Provided Methods§

Source

fn verified(&self) -> Option<bool>

A nullable verification value is not explicitly false.

Source

fn failed_verification_count(&self) -> Option<f64>

Source

fn locked_until(&self) -> Option<DateTime<Utc>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§