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§
fn id(&self) -> Cow<'_, str>
fn secret(&self) -> &str
fn backup_codes(&self) -> &str
fn user_id(&self) -> Cow<'_, str>
Provided Methods§
fn failed_verification_count(&self) -> Option<f64>
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".