pub struct EmailVerification<U> { /* private fields */ }Expand description
A panel’s email verification, installed with
Auth::email_verification: the EmailVerifier, and how
many links one account may ask for. The links go out through the panel’s
AuthMail.
use tablo_core::{Auth, AuthMail, EmailVerification, PasswordAuth, PasswordSignUp};
use topcoat::mail::Mailbox;
let auth = Auth::password()
.mail(AuthMail::new(
Mailbox::new("no-reply@example.com")?,
"https://admin.example.com",
))
.registration(PasswordSignUp::open())
.email_verification(EmailVerification::new(PasswordAuth));U is the user type the verifier loads; Auth takes only one over the type its
authenticator loads.
Implementations§
Source§impl<U: PanelUser> EmailVerification<U>
impl<U: PanelUser> EmailVerification<U>
Sourcepub fn new(verifier: impl EmailVerifier<User = U>) -> Self
pub fn new(verifier: impl EmailVerifier<User = U>) -> Self
Verifies addresses through verifier.
Sourcepub fn throttle(self, throttle: LoginThrottle) -> Self
pub fn throttle(self, throttle: LoginThrottle) -> Self
How many links one signed-in account may ask for in a window, from any client; defaults to three in fifteen minutes. The link a sign-up mails does not count.
Trait Implementations§
Auto Trait Implementations§
impl<U> !Freeze for EmailVerification<U>
impl<U> !RefUnwindSafe for EmailVerification<U>
impl<U> !UnwindSafe for EmailVerification<U>
impl<U> Forget for EmailVerification<U>
impl<U> Move for EmailVerification<U>
impl<U> Send for EmailVerification<U>
impl<U> Sync for EmailVerification<U>
impl<U> Unpin for EmailVerification<U>
impl<U> UnsafeUnpin for EmailVerification<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