Skip to main content

Module account_status

Module account_status 

Source
Expand description

Account states a foreign database keeps outside the password column.

Some databases mark deactivation in a column of its own while leaving the hash in place, and spell an account an identity provider authenticates as an empty hash. This server reads both states from the password alone, so until they are adopted the first reads as active and the second as deactivated.

Re-exportsยง

use std::fmt; ๐Ÿ”’
use std::str::from_utf8; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use futures::FutureExt; ๐Ÿ”’
use futures::Stream; ๐Ÿ”’
use futures::StreamExt; ๐Ÿ”’
use futures::TryFutureExt; ๐Ÿ”’
use futures::TryStreamExt; ๐Ÿ”’
use futures::future::BoxFuture; ๐Ÿ”’
use futures::stream::once; ๐Ÿ”’
use ruma::OwnedUserId; ๐Ÿ”’
use ruma::ServerName; ๐Ÿ”’
use ruma::UserId; ๐Ÿ”’
use tuwunel_core::Result; ๐Ÿ”’
use tuwunel_core::result::NotFound; ๐Ÿ”’
use tuwunel_core::smallstr::SmallString; ๐Ÿ”’
use tuwunel_core::utils::BoolExt; ๐Ÿ”’
use tuwunel_core::utils::IterStream; ๐Ÿ”’
use tuwunel_core::utils::TryReadyExt; ๐Ÿ”’
use tuwunel_core::utils::option::OptionExt; ๐Ÿ”’
use tuwunel_core::utils::stream::TryBroadbandExt; ๐Ÿ”’
use tuwunel_database::KeyBuf; ๐Ÿ”’
use tuwunel_database::Map; ๐Ÿ”’
use super::Check; ๐Ÿ”’
use super::Report; ๐Ÿ”’
use super::ScanExt; ๐Ÿ”’
use super::Summary; ๐Ÿ”’
use super::leading_record; ๐Ÿ”’
use super::tally; ๐Ÿ”’
use crate::Services; ๐Ÿ”’
use crate::migrations::ADOPT_ACCOUNT_STATUS; ๐Ÿ”’
use crate::migrations::local_user_id; ๐Ÿ”’
use crate::migrations::marker_present; ๐Ÿ”’

Structsยง

Columns
The foreign account columns the database holds, opened.
Named ๐Ÿ”’
The account a foreign row names, read as a release build decodes the row.

Enumsยง

Finding
An account whose password here does not say what a foreign column records, or a foreign row this check cannot read.
Subject ๐Ÿ”’
What a row of the foreign subject column names.

Constantsยง

DEACTIVATED_COLUMN ๐Ÿ”’
SUBJECTS_COLUMN ๐Ÿ”’

Staticsยง

CHECK ๐Ÿ”’

Functionsยง

account ๐Ÿ”’
columns
Opens each foreign account column the database holds.
deactivation ๐Ÿ”’
deactivations ๐Ÿ”’
Streams every account the foreign deactivation column marks.
findings ๐Ÿ”’
hash_empty ๐Ÿ”’
Whether the accountโ€™s stored password is empty, or None when it has no row at all.
hash_kept ๐Ÿ”’
Whether the account has a password row here that is not empty.
passwordless ๐Ÿ”’
scan
Streams each account whose password does not say what a foreign column records, only while the adoption is unstamped.
subject ๐Ÿ”’
subjects ๐Ÿ”’
Streams what every row of the foreign subject column names.
unmarked_passwordless ๐Ÿ”’
Whether the accountโ€™s password here is empty while no foreign column marks it deactivated.
walk ๐Ÿ”’

Type Aliasesยง

Account ๐Ÿ”’
An account the foreign deactivation column names, or the key of a row naming none.
Findings ๐Ÿ”’
Text ๐Ÿ”’