Skip to main content

Module credentials

Module credentials 

Source
Expand description

Credentials: changing a password, signing out everywhere, API tokens, and the administrator’s view of the sign-in throttle (crate::security).

None of these routes accepts an API token (security::is_credential_route and the request guard): a leaked token must not be able to mint another, change its owner’s password, or revoke the others to hide.

Structs§

ClearQuery
CreatedToken
NewToken
PasswordChange
TokenQuery
TokenView
A token as the API reports it — never its secret or its hash.

Functions§

change_password
Change your own password. The current one is required, and a wrong one counts against the sign-in throttle like a failed sign-in. Every OTHER session of the account ends; this one stays signed in. API tokens are left alone — they are revoked on their own.
clear_lockouts
create_token
list_lockouts
list_tokens
Your tokens; an administrator’s ?all=true lists everyone’s.
logout_all
Sign out everywhere: every session of this account ends, this one too.
revoke_token
Revoke a token: its owner, or an administrator.
sign_out_user
An administrator signs a user out of every browser.