User identifier in the HSM. Maximum size of constants.MAX_USR_LEN.
HSM user password. Maximum size of constants.MAX_USR_PWD_LEN.
Optional
permissions: USER_PERMISSIONS[]User permissions in HSM. Default: enums.USER_PERMISSIONS.NOP.
Returns true if the user was created successfully.
Throws an exception if an error occurs when creating the user.
Throws exception if userId or password are invalid.
Example code: Creating a user
Removes a user from HSM.
User identifier in the HSM. Maximum size of constants.MAX_USR_LEN.
Returns true if the user was successfully removed.
Throws an exception if an error occurs when removing the user.
Throws exception if userId is invalid.
Example code: Removing a user
Blocks a user in HSM.
User identifier in the HSM. Maximum size of constants.MAX_USR_LEN.
Example code: Blocking a user
Unlocks a user in HSM.
User identifier in the HSM. Maximum size of constants.MAX_USR_LEN.
Example code: Unlocking a user
Changes the authenticated user's password.
New HSM user password. Size must be between constants.MIN_USR_PWD_LEN and constants.MAX_USR_PWD_LEN.
Returns true if the password was changed successfully.
Throws exception if an error occurs when changing the password.
Throws exception if new password is invalid.
Example code: Changing the access password
Lists the tokens of the authenticated user.
Returns an array with the user's tokens.
Throws an exception if an error occurs when listing the tokens.
Throws exception if token is invalid.
Example code: Listing access tokens
Generates a token for the authenticated user.
Optional
expiration: DateToken expiration date. Default: No expiration.
Returns the generated token.
Throws exception if an error occurs when generating the token.
Throws exception if expiration date is invalid.
Example code: Generating an access token
Revoke an authenticated user's token.
Token to be revoked. The token generated by the generateToken method or returned by the listTokens method.
Returns true if the token was successfully revoked.
Throws exception if an error occurs when revoking the token.
Throws exception if token is invalid.
Example code: Revoking an access token
Create a user in HSM.