Skip to main content

AuthTwoFactor

Trait AuthTwoFactor 

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

Trait representing a two-factor authentication entity.

Required Methods§

Source

fn id(&self) -> &str

Source

fn secret(&self) -> &str

Source

fn backup_codes(&self) -> Option<&str>

Source

fn user_id(&self) -> &str

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§