Expand description
Email third-party identifier bindings and verification sessions.
The service stores bidirectional email bindings, durable pending proofs, and UIAA ownership claims. Process-local token buckets separately limit verification requests by caller address and canonical email.
Re-exportsยง
use std::collections::HashMap;๐use std::net::IpAddr;๐use std::sync::Arc;๐use std::sync::Mutex;๐use std::time::Instant;๐use ruma::MilliSecondsSinceUnixEpoch;๐use ruma::OwnedDeviceId;๐use ruma::OwnedUserId;๐use ruma::thirdparty::Medium;๐use serde::Deserialize;๐use serde::Deserialize;๐use serde::Serialize;๐use serde::Serialize;๐use tuwunel_core::Result;๐use tuwunel_core::smallstr::SmallString;๐use tuwunel_core::utils::MutexMap;๐use tuwunel_database::Database;๐use tuwunel_database::Map;๐pub use self::canonical::canonicalize_email;pub use self::pending::PendingOutcome;
Modulesยง
- binding ๐
- Persistent email-to-user bindings.
- canonical ๐
- Canonical email keys for binding and verification lookups.
- pending ๐
- Durable email-verification proofs and UIAA ownership claims.
- ratelimit ๐
- Verification-request limits keyed by source and destination.
Structsยง
- Association
- Validated third-party identifier consumed from a pending proof.
- Binding ๐
- CBOR value of a
userid_emailrow: the per-binding metadata, with the address carried in the composite key. - Data ๐
- Service
- Manages email threepid bindings, verification sessions, and request limits.
Type Aliasesยง
- Email
Key ๐ - Stack-string key for the per-address throttle bucket; the modal email canonical address fits inline.
- Ratelimiter ๐
- Token-bucket table keyed on a throttle axis: last-refill instant and remaining tokens per key.
- UiaaKey
- Identifies the exact UIAA session that owns a validated threepid.
- Uiaa
Session Id - Stores a UIAA session identifier inline in the common case.