Skip to main content

Module email_token

Module email_token 

Source

Re-exportsยง

use std::net::IpAddr; ๐Ÿ”’
use std::time::Duration; ๐Ÿ”’
use ruma::OwnedSessionId; ๐Ÿ”’
use ruma::thirdparty::Medium; ๐Ÿ”’
use tuwunel_core::Result; ๐Ÿ”’
use tuwunel_core::err; ๐Ÿ”’
use tuwunel_core::utils::html::escape as html_escape; ๐Ÿ”’
use tuwunel_service::Services; ๐Ÿ”’
use url::form_urlencoded; ๐Ÿ”’

Constantsยง

PENDING_TTL ๐Ÿ”’
Lifetime of a pending email verification before it self-reaps.

Functionsยง

send_email_token ๐Ÿ”’
Shared requestToken spine for the email medium: throttle both axes, open or reuse a pending verification, and send the magic-link message when a token is freshly minted. The caller supplies the already-canonicalized address and performs its own directional in-use / not-found check beforehand.
validate_link ๐Ÿ”’
verification_html ๐Ÿ”’