Skip to main content

Module browser_session

Module browser_session 

Source
Expand description

Browser sessions minted by a password sign-in on the built-in login page.

A row records when the browser signed in; expiry is computed at each read from the live authentication.oidc.browser_session_ttl, so lowering the setting shortens existing sessions at once. The cookie names the user and a random secret, and only the secret’s digest is stored.

Re-exportsΒ§

use std::time::Duration; πŸ”’
use futures::TryFutureExt; πŸ”’
use ruma::UserId; πŸ”’
use tuwunel_core::Result; πŸ”’
use tuwunel_core::debug; πŸ”’
use tuwunel_core::debug; πŸ”’
use tuwunel_core::implement; πŸ”’
use tuwunel_core::utils::BoolExt; πŸ”’
use tuwunel_core::utils::hash::sha256::hash as sha256; πŸ”’
use tuwunel_core::utils::millis_since_unix_epoch; πŸ”’
use tuwunel_core::utils::random_string; πŸ”’
use tuwunel_core::utils::result::NotFound; πŸ”’
use tuwunel_core::utils::stream::TryReadyExt; πŸ”’
use tuwunel_core::utils::time::now; πŸ”’
use tuwunel_core::warn; πŸ”’
use tuwunel_database::Deserialized; πŸ”’
use tuwunel_database::Interfix; πŸ”’

StructsΒ§

BrowserSession
A browser session started by a password sign-in.

ConstantsΒ§

SECRET_LENGTH πŸ”’
TTL_MAX πŸ”’
Upper bound on browser_session_ttl, in seconds.

FunctionsΒ§

parse_token πŸ”’