pub struct PasswordManagementConfig {
pub reset_password_token_expires_in: Option<f64>,
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_password_token_expires_in: Option<f64>Reset token lifetime in seconds, including fractions. Zero and NaN select one hour.
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. Errors propagate after the password write and before session revocation.
password_hasher: Option<Arc<dyn PasswordHasher>>Custom password hasher. When None, the default scrypt hasher is used.
Implementations§
Source§impl PasswordManagementConfig
impl PasswordManagementConfig
Sourcepub fn reset_password_token_expires_in(&self) -> f64
pub fn reset_password_token_expires_in(&self) -> f64
Read the reset-token lifetime in seconds. Omission, zero and NaN use one hour.
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