pub struct EmailOtpConfig {Show 19 fields
pub send_verification_otp: Option<Arc<dyn SendEmailOtp>>,
pub generate_otp: Option<Arc<dyn EmailOtpGenerator>>,
pub otp_length: f64,
pub expires_in: f64,
pub allowed_attempts: f64,
pub rate_limit: EndpointRateLimit,
pub storage: EmailOtpStorage,
pub resend_strategy: OtpResendStrategy,
pub disable_sign_up: bool,
pub send_verification_on_sign_up: bool,
pub override_default_email_verification: bool,
pub change_email_enabled: bool,
pub verify_current_email: bool,
pub auto_sign_in_after_verification: bool,
pub before_email_verification: Option<EmailVerificationHook>,
pub after_email_verification: Option<EmailVerificationHook>,
pub password_hasher: Option<Arc<dyn PasswordHasher>>,
pub revoke_sessions_on_password_reset: bool,
pub on_password_reset: Option<Arc<OnPasswordResetCallback>>,
}Expand description
Configuration for email OTP verification, login, password reset and email change.
Fields§
§send_verification_otp: Option<Arc<dyn SendEmailOtp>>§generate_otp: Option<Arc<dyn EmailOtpGenerator>>§otp_length: f64Raw numeric length. Safe positive fractions round up; NaN generates an empty code. Nonpositive and resource-unsafe lengths fail generation.
expires_in: f64Lifetime in seconds. Fractions retain JavaScript millisecond rounding; invalid dates fail before persistence.
allowed_attempts: f64Raw attempt budget compared with the persisted integer counter. Zero and NaN use three; negative values reject even an unused proof.
rate_limit: EndpointRateLimit§storage: EmailOtpStorage§resend_strategy: OtpResendStrategy§disable_sign_up: bool§send_verification_on_sign_up: bool§override_default_email_verification: bool§change_email_enabled: bool§verify_current_email: bool§auto_sign_in_after_verification: bool§before_email_verification: Option<EmailVerificationHook>§after_email_verification: Option<EmailVerificationHook>§password_hasher: Option<Arc<dyn PasswordHasher>>§revoke_sessions_on_password_reset: bool§on_password_reset: Option<Arc<OnPasswordResetCallback>>Trait Implementations§
Source§impl Clone for EmailOtpConfig
impl Clone for EmailOtpConfig
Source§impl Debug for EmailOtpConfig
impl Debug for EmailOtpConfig
Auto Trait Implementations§
impl !RefUnwindSafe for EmailOtpConfig
impl !UnwindSafe for EmailOtpConfig
impl Freeze for EmailOtpConfig
impl Send for EmailOtpConfig
impl Sync for EmailOtpConfig
impl Unpin for EmailOtpConfig
impl UnsafeUnpin for EmailOtpConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more