pub struct PasswordReset<U> { /* private fields */ }Expand description
A panel’s password reset, installed with
Auth::password_reset: the PasswordResetter, and how many
links one address may ask for. The links go out through the panel’s
AuthMail.
use tablo_core::{Auth, AuthMail, PasswordAuth, PasswordReset};
use topcoat::mail::Mailbox;
let auth = Auth::password()
.mail(AuthMail::new(
Mailbox::new("no-reply@example.com")?,
"https://admin.example.com",
))
.password_reset(PasswordReset::new(PasswordAuth));U is the user type the resetter loads; Auth takes only one over the type its
authenticator loads.
Implementations§
Source§impl<U: PanelUser> PasswordReset<U>
impl<U: PanelUser> PasswordReset<U>
Sourcepub fn new(resetter: impl PasswordResetter<User = U>) -> Self
pub fn new(resetter: impl PasswordResetter<User = U>) -> Self
Resets passwords through resetter.
Sourcepub fn throttle(self, throttle: LoginThrottle) -> Self
pub fn throttle(self, throttle: LoginThrottle) -> Self
How many reset links one email address may request in a window, from any client; defaults to three in fifteen minutes. Every request that names an address counts, whether or not an account uses it. A limit per client belongs at the proxy.
Trait Implementations§
Auto Trait Implementations§
impl<U> !Freeze for PasswordReset<U>
impl<U> !RefUnwindSafe for PasswordReset<U>
impl<U> !UnwindSafe for PasswordReset<U>
impl<U> Forget for PasswordReset<U>
impl<U> Move for PasswordReset<U>
impl<U> Send for PasswordReset<U>
impl<U> Sync for PasswordReset<U>
impl<U> Unpin for PasswordReset<U>
impl<U> UnsafeUnpin for PasswordReset<U>
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