pub struct EmailPassword { /* private fields */ }Expand description
Email and password sign-in. Off unless .email_password(..) is called.
Implementations§
Source§impl EmailPassword
impl EmailPassword
Sourcepub fn revokes_sessions_on_password_reset(&self) -> bool
pub fn revokes_sessions_on_password_reset(&self) -> bool
Whether a password reset signs the user out everywhere, for plugins that reset passwords.
pub fn min_password_length(self, n: usize) -> Self
pub fn max_password_length(self, n: usize) -> Self
Sourcepub fn require_email_verification(self, on: bool) -> Self
pub fn require_email_verification(self, on: bool) -> Self
Sign-in fails with EMAIL_NOT_VERIFIED until the user verifies. Needs a mailer.
Sourcepub fn auto_sign_in(self, on: bool) -> Self
pub fn auto_sign_in(self, on: bool) -> Self
Sign-up returns a session (default true). Ignored when verification is required.
pub fn revoke_sessions_on_password_reset(self, on: bool) -> Self
pub fn reset_password_ttl(self, ttl: Duration) -> Self
Sourcepub fn password_policy(
self,
policy: impl Fn(&str) -> bool + Send + Sync + 'static,
) -> Self
pub fn password_policy( self, policy: impl Fn(&str) -> bool + Send + Sync + 'static, ) -> Self
Extra check on new passwords; returning false answers PASSWORD_TOO_WEAK.
pub fn hasher(self, hasher: impl PasswordHasher) -> Self
Trait Implementations§
Source§impl Clone for EmailPassword
impl Clone for EmailPassword
Source§impl Debug for EmailPassword
impl Debug for EmailPassword
Auto Trait Implementations§
impl !RefUnwindSafe for EmailPassword
impl !UnwindSafe for EmailPassword
impl Forget for EmailPassword
impl Freeze for EmailPassword
impl Move for EmailPassword
impl Send for EmailPassword
impl Sync for EmailPassword
impl Unpin for EmailPassword
impl UnsafeUnpin for EmailPassword
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