Accounts
#
IntroductionAccount is an entity within the system representing theorically one physical person in the "real world".
It is used for 3 main reasons:
- link identities together (one person can have many identities).
- store a password (for authentication flow and for the use cryptographic features).
- store some backup data (data used to make cryptographic features better).
An account has always an identity linked to it, it cannot exist alone. Though it is important to notice it is identities that contains that link information, considering the one (account) to many (identities) relationship.
#
Set a password on a identityThis endpoint can be used to:
- set a new password to an identity to setup the crypto of the account
- reset the password of an identity
#
RequestCookies:
accesstoken
(opaque token) (ACR >=required_acr
):mid
claim as the identity id.tokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks.
Path Parameters:
id
(uuid string): the account id.
JSON Body:
#
ResponseCode:
#
Change passwordThis route allows the update of an account password and the associated backup data.
The old_prehashed_password
and new_prehashed_password
contain information following Argon2 server relief concepts.
#
RequestCookies:
accesstoken
(opaque token) (ACR >= 2):mid
claim as the identity id.tokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks.
Path Parameters:
id
(uuid string): the account id.
JSON Body:
old_prehashed_password
(object): prehashed password using argon2:params
(object): argon2 parameters:memory
(integer).parallelism
(integer).iterations
(integer).salt_base_64
(base64 string).
hash_base_64
(base64 string): the prehashed password.
new_prehashed_password
(object): prehashed password using argon2:params
(object): argon2 parameters:memory
(integer).parallelism
(integer).iterations
(integer).salt_base_64
(base64 string).
hash_base_64
(base64 string): the prehashed password.
encrypted_account_root_key
(URL-safe base64): the account root key encrypted with the new password
#
ResponseCode:
#
Get the account password parametersThis route allows the retrieval of the account password hash parameters.
Hash parameters contains information about the way the password has been hashed following Argon2 server relief concepts.
#
Request#
ResponseCode:
memory
(integer).parallelism
(integer).iterations
(integer).salt_base_64
(base64 string).
#
Get the account backupThis route allows the retrieval of the account backup using the unique account id.
Note that “account secret backup” mechanism is now read-only since the deployment of the new “secret storage” mechanism.
#
RequestCookies:
accesstoken
(opaque token) (ACR >= 2):mid
claim as an identity id linked to the account.tokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks.
Path Parameters:
id
(uuid string): the unique account id.
#
ResponseCode:
JSON Body:
data
(string): the user backup data.version
(integer): the current backup version.