pub struct TwoFactorConfig {
pub issuer: Option<String>,
pub skip_verification_on_enable: bool,
pub two_factor_cookie_max_age: i64,
pub trust_device_max_age: i64,
pub totp_period: u64,
pub totp_digits: usize,
pub send_otp: Option<Arc<dyn SendTwoFactorOtp>>,
}Expand description
Public configuration for the two-factor plugin.
Fields§
§issuer: Option<String>Override the issuer embedded in generated TOTP URIs.
skip_verification_on_enable: boolSkip the enrollment verification step and enable 2FA immediately.
Maximum lifetime for the pending two-factor cookie used during sign-in.
trust_device_max_age: i64Maximum lifetime for the trusted-device cookie.
totp_period: u64TOTP period in seconds.
totp_digits: usizeTOTP digit count.
send_otp: Option<Arc<dyn SendTwoFactorOtp>>Optional OTP sender callback. When absent, /two-factor/send-otp is disabled.
Trait Implementations§
Source§impl Clone for TwoFactorConfig
impl Clone for TwoFactorConfig
Source§fn clone(&self) -> TwoFactorConfig
fn clone(&self) -> TwoFactorConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TwoFactorConfig
impl Debug for TwoFactorConfig
Source§impl Default for TwoFactorConfig
impl Default for TwoFactorConfig
Source§fn default() -> TwoFactorConfig
fn default() -> TwoFactorConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for TwoFactorConfig
impl !UnwindSafe for TwoFactorConfig
impl Freeze for TwoFactorConfig
impl Send for TwoFactorConfig
impl Sync for TwoFactorConfig
impl Unpin for TwoFactorConfig
impl UnsafeUnpin for TwoFactorConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more