Represents an independent account manager object. Allows to manage accounts and update the account information.
The Constants section below lists errors that may be returned in a callback if an operation fails.
You can access the object by using the launchbox.AccountManager
reference.
Name | Description |
---|---|
ACCOUNT_DOES_NOT_EXIST_ERROR | Thrown if the account invoked in order to change its password, remove it, etc. does not exist. |
ACCOUNT_EXISTS_ERROR | Thrown when the addAccount method is called and the account has
already been created. |
ACCOUNT_NOT_OPEN_ERROR | Thrown if any of the setField ,
removeField , getPrivateAccountData
methods is called before the account has been opened. |
ACCOUNT_OPEN_ERROR | Thrown if any of the openAccount ,
removeAccount or changePassword
methods is called after the account has been opened. |
FIELD_DOES_NOT_EXIST_ERROR | Thrown if the removeField method is called to remove the field
that does not exist. |
INCORRECT_SCOPE_ERROR | Thrown if the setField or removeField
method is called for a field in scope that is different from either public or
private. |
INTERNAL_ERROR | Thrown when a fatal error occurs in communication with the accounts database. |
INVALID_CREDENTIALS_ERROR | Denotes that the openAccount method has failed due to invalid
credentials. It may be thrown after enrolling to the profile service to denote that the
changePassword method needs to be invoked to reencrypt storages
associated with this account. |
INCORRECT_AUTHENTICATION_MODE_ERROR | Denotes that the end user tries to use more or less credentials than defined at application creation stage. |
Name | Description | Type |
---|---|---|
accountManagerListener |
Represents the |
object |
identifier | A read-only property that contains an identifier of the currently open account. | string |
Name | Return type | Description |
---|---|---|
getAccountList | undefined |
Passes a map of all accounts with their public user data to the |
addAccount | undefined |
Adds a new account. |
removeAccount | undefined |
Removes an account from the device. |
openAccount | undefined |
Opens/authenticates an account and grants access to private (encrypted) data. |
closeAccount | undefined |
Closes the open account. |
changePassword | undefined |
Changes a password for the user's account in the client, after it has been changed in the backend. |
getPrivateAccountData | undefined |
Requests a list of all private (encrypted) data and passes it by means of the |
setField | undefined |
Sets a value for the key in the selected account data scope (either public or private). |
removeField | undefined |
Removes a key, together with its corresponding value, from the selected account data scope (either public or private). |