Expand description
Durable email-verification proofs and UIAA ownership claims.
Pending rows bind a client secret, token, address, expiry, and use state to a deterministic session identifier. Keyed in-memory locks serialize local updates while database transactions keep claim indexes aligned with proof state.
Re-exportsยง
use std::time::Duration;๐use std::time::SystemTime;๐use aws_lc_rs::constant_time::verify_slices_are_equal;๐use base64::Engine as _;๐use base64::engine::general_purpose::URL_SAFE_NO_PAD as b64encode;๐use ruma::thirdparty::Medium;๐use serde::Deserialize;๐use serde::Deserialize;๐use serde::Serialize;๐use serde::Serialize;๐use tuwunel_core::Err;๐use tuwunel_core::Result;๐use tuwunel_core::implement;๐use tuwunel_core::result::NotFound;๐use tuwunel_core::smallstr::SmallString;๐use tuwunel_core::utils;๐use tuwunel_core::utils::hash::sha256;๐use tuwunel_core::utils::time::deadline_has_passed;๐use tuwunel_core::utils::time::timepoint_from_now;๐use tuwunel_database::Cbor;๐use tuwunel_database::Deserialized;๐use super::Association;๐use super::UiaaKey;๐
Structsยง
- Pending ๐
- Stored state for a pending third-party identifier validation.
- Pending
Outcome - Outcome of creating or reusing a pending verification session.
Enumsยง
- Pending
Use ๐ - Single-use state of a validated pending session.
Constantsยง
- MAX_
VERIFY_ ๐ATTEMPTS - Failed-validation ceiling: the session self-destructs once this many wrong submissions have been counted, so the Nth burns and N-1 are tolerated. Caps token brute-force (mirrors the device-grant ceiling).
- TOKEN_
LENGTH ๐ - Characters minted for the single-use, server-private validation token.
- UIAA_
SESSION_ ๐TTL - Persistence lifetime shared by UIAA sessions and their threepid claims.
Functionsยง
- ct_eq ๐
- derive_
sid ๐ - Deterministic session id binding the request identity to one storage key.
- expired ๐
Type Aliasesยง
- Claim
Sid ๐