pub struct PasswordManagementConfig {
pub reset_token_expiry_hours: i64,
pub reset_token_expiry: Option<Duration>,
pub require_current_password: bool,
pub send_email_notifications: bool,
pub revoke_sessions_on_password_reset: bool,
pub send_reset_password: Option<Arc<dyn SendResetPassword>>,
pub on_password_reset: Option<Arc<OnPasswordResetCallback>>,
pub password_hasher: Option<Arc<dyn PasswordHasher>>,
}Fields§
§reset_token_expiry_hours: i64§reset_token_expiry: Option<Duration>Overrides the legacy hour setting with a precise reset-token duration. Zero retains the default expiry, matching the upstream option.
require_current_password: bool§send_email_notifications: bool§revoke_sessions_on_password_reset: boolWhen true, all existing sessions are revoked on password reset (default: false).
send_reset_password: Option<Arc<dyn SendResetPassword>>Password reset email sender for POST /request-password-reset.
This route is disabled when no sender is configured.
on_password_reset: Option<Arc<OnPasswordResetCallback>>Callback invoked after a password is successfully reset. The initialized user schema is provided as a serialized JSON value. Errors propagate after the credential write and before session revocation.
password_hasher: Option<Arc<dyn PasswordHasher>>Custom password hasher. When None, the default scrypt hasher is used.
Resetting a password inherits an initialized email/password hasher first.
Trait Implementations§
Source§impl Clone for PasswordManagementConfig
impl Clone for PasswordManagementConfig
Source§impl Debug for PasswordManagementConfig
impl Debug for PasswordManagementConfig
Auto Trait Implementations§
impl !RefUnwindSafe for PasswordManagementConfig
impl !UnwindSafe for PasswordManagementConfig
impl Freeze for PasswordManagementConfig
impl Send for PasswordManagementConfig
impl Sync for PasswordManagementConfig
impl Unpin for PasswordManagementConfig
impl UnsafeUnpin for PasswordManagementConfig
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