Expand description
Access-token expiries a foreign database keeps in a column of its own.
That column is keyed by device, while this server keeps the expiry beside the owner in the shared token column. A token the origin issued reads as never expiring here until its expiry is adopted, which waits for an OIDC provider the session can refresh against.
Re-exportsΒ§
use std::fmt;πuse std::str::from_utf8;πuse std::sync::Arc;πuse futures::FutureExt;πuse futures::Stream;πuse futures::TryStreamExt;πuse futures::future::BoxFuture;πuse ruma::DeviceId;πuse ruma::OwnedDeviceId;πuse ruma::OwnedUserId;πuse ruma::UserId;πuse tuwunel_core::Result;πuse tuwunel_core::result::NotFound;πuse tuwunel_core::smallstr::SmallString;πuse tuwunel_core::utils::IterStream;πuse tuwunel_core::utils::TryReadyExt;πuse tuwunel_core::utils::stream::TryBroadbandExt;πuse tuwunel_database::KeyBuf;πuse tuwunel_database::Map;πuse tuwunel_database::SEP;πuse super::Check;πuse super::Report;πuse super::ScanExt;πuse super::Summary;πuse super::leading_record;πuse super::tally;πuse crate::Services;πuse crate::users::device::TOKEN_LENGTH;π
StructsΒ§
- Held π
- A token this server holds, with the owner its stored value names.
EnumsΒ§
- Finding
- A token a foreign expiry column names whose expiry is not as this server needs it, or a row this check cannot read.
- Row π
- One row of the origin column, decoded.
- Token π
- The token an origin rowβs device holds here, as both passes read it.
ConstantsΒ§
- ORIGIN_
COLUMN π
StaticsΒ§
- CHECK π
FunctionsΒ§
- classify π
- Classifies a stored token value as both passes read it.
- device π
- Reads a key as a user id and a device id, as a release build decodes it.
- findings π
- origin
- Opens the origin column, if the database holds one.
- pair π
- Splits a key or value into its first two records and whatever follows them, as a release build reads a pair.
- row π
- rows π
- Streams every row of the origin column, decoded.
- scan
- Streams each token the origin column names whose expiry is not as this server needs it.
- token π
- Reads the token a device holds here and classifies its stored value against the recorded expiry.
- token_
value π - Reads a stored token value as a release build decodes it.
- walk π
Type AliasesΒ§
- Access
Token π - Column π
- Findings π