pub struct PasswordManagementConfig {
pub reset_token_expiry_hours: i64,
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<dyn Fn(Value) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>> + Send + Sync>>,
pub password_hasher: Option<Arc<dyn PasswordHasher>>,
}Fields§
§reset_token_expiry_hours: i64§require_current_password: bool§send_email_notifications: bool§revoke_sessions_on_password_reset: boolWhen true, all existing sessions are revoked on password reset (default: true).
send_reset_password: Option<Arc<dyn SendResetPassword>>Custom password reset email sender. When set, overrides the default EmailProvider.
on_password_reset: Option<Arc<dyn Fn(Value) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>> + Send + Sync>>Callback invoked after a password is successfully reset.
The user is provided as a serialized serde_json::Value.
password_hasher: Option<Arc<dyn PasswordHasher>>Custom password hasher. When None, the default Argon2 hasher is used.
Trait Implementations§
Source§impl Clone for PasswordManagementConfig
impl Clone for PasswordManagementConfig
Source§fn clone(&self) -> PasswordManagementConfig
fn clone(&self) -> PasswordManagementConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 PasswordManagementConfig
impl Debug for PasswordManagementConfig
Source§impl Default for PasswordManagementConfig
impl Default for PasswordManagementConfig
Source§fn default() -> PasswordManagementConfig
fn default() -> PasswordManagementConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PasswordManagementConfig
impl !RefUnwindSafe for PasswordManagementConfig
impl Send for PasswordManagementConfig
impl Sync for PasswordManagementConfig
impl Unpin for PasswordManagementConfig
impl UnsafeUnpin for PasswordManagementConfig
impl !UnwindSafe for PasswordManagementConfig
Blanket Implementations§
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