pub struct PasswordOptions {
pub min_password_length: usize,
pub max_password_length: usize,
pub send_reset_password: Option<Arc<dyn SendResetPassword>>,
pub reset_password_token_expires_in: Option<u64>,
pub on_password_reset: Option<Arc<dyn OnPasswordReset>>,
pub revoke_sessions_on_password_reset: bool,
}Expand description
Password policy configuration.
Fields§
§min_password_length: usize§max_password_length: usize§send_reset_password: Option<Arc<dyn SendResetPassword>>§reset_password_token_expires_in: Option<u64>§on_password_reset: Option<Arc<dyn OnPasswordReset>>§revoke_sessions_on_password_reset: boolImplementations§
Source§impl PasswordOptions
impl PasswordOptions
pub fn new() -> PasswordOptions
pub fn builder() -> PasswordOptions
pub fn min_password_length(self, length: usize) -> PasswordOptions
pub fn max_password_length(self, length: usize) -> PasswordOptions
pub fn send_reset_password<S>(self, sender: S) -> PasswordOptionswhere
S: SendResetPassword,
pub fn reset_password_token_expires_in(self, seconds: u64) -> PasswordOptions
pub fn on_password_reset<P>(self, handler: P) -> PasswordOptionswhere
P: OnPasswordReset,
pub fn revoke_sessions_on_password_reset(self, enabled: bool) -> PasswordOptions
Trait Implementations§
Source§impl Clone for PasswordOptions
impl Clone for PasswordOptions
Source§fn clone(&self) -> PasswordOptions
fn clone(&self) -> PasswordOptions
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 PasswordOptions
impl Debug for PasswordOptions
Source§impl Default for PasswordOptions
impl Default for PasswordOptions
Source§fn default() -> PasswordOptions
fn default() -> PasswordOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PasswordOptions
impl !UnwindSafe for PasswordOptions
impl Freeze for PasswordOptions
impl Send for PasswordOptions
impl Sync for PasswordOptions
impl Unpin for PasswordOptions
impl UnsafeUnpin for PasswordOptions
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