pub struct AuthMail { /* private fields */ }Expand description
Where a panel’s auth mail comes from and where its links point, installed with
Auth::mail: the sender, and the absolute URL every link starts with.
use tablo_core::{Auth, AuthMail, PasswordAuth, PasswordReset};
use topcoat::mail::Mailbox;
let auth = Auth::password()
.mail(AuthMail::new(
Mailbox::named("Example", "no-reply@example.com")?,
"https://admin.example.com",
))
.password_reset(PasswordReset::new(PasswordAuth));The base URL is configuration, not the request’s Host header, which the client chooses: a
link built from it could point a victim’s email at another host. Mounting refuses a base URL
that is not an absolute http or https URL, or that carries a query or fragment, and a
router without a MailConfig, which the app registers with
.mail(..) before mounting the panel.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuthMail
impl RefUnwindSafe for AuthMail
impl Send for AuthMail
impl Sync for AuthMail
impl Unpin for AuthMail
impl UnsafeUnpin for AuthMail
impl UnwindSafe for AuthMail
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