Skip to main content

Module user

Module user 

Source
Expand description

User-centric commands that cross both the web and SSH login paths.

Extracted from web/src/handler.rs so the SSH daemon reuses the exact same password-verification code: same Argon2 parameters, same “invalid email or password” failure mode.

Structs§

Account
A directory row plus the reason it may not be served, in one read.
NewUser
A row to add to the directory.
VerifiedUser
What a successful verify_user_password returns. The daemon gates the entire password code path on ssh_enabled = TRUE; the web handler ignores that flag since it owns its own login surface.

Enums§

Refusal
Why a session may not proceed, when it may not.

Functions§

account_refusal
Whether this user may currently be served, and if not, why.
change_password
Replaces the password and revokes every outstanding session, in one statement.
create_user
Inserts a directory row for a freshly provisioned tenant.
email_taken
Whether an email is already registered.
fetch_account
Fetches an account and its serving status.
verify_user_password
Shared verification helper returning the richer VerifiedUser shape. The SSH daemon uses this directly so it can gate the password path on ssh_enabled.