Hierarchy

  • User

Methods

  • Description

    Blocks a user in HSM.

    Parameters

    • userId: string

      User identifier in the HSM. Maximum size of MAX_USR_LEN.

    Returns Promise<boolean>

  • Description

    Changes the authenticated user's password.

    Returns

    Returns true if the password was changed successfully.

    Throws

    Throws exception if an error occurs when changing the password.

    Throws

    Throws exception if new password is invalid.

    Parameters

    Returns Promise<boolean>

  • Description

    Create a user in HSM.

    Returns

    Returns true if the user was created successfully.

    Throws

    Throws an exception if an error occurs when creating the user.

    Throws

    Throws exception if userId or password are invalid.

    Parameters

    Returns Promise<boolean>

  • Description

    Generates a token for the authenticated user.

    Returns

    Returns the generated token.

    Throws

    Throws exception if an error occurs when generating the token.

    Throws

    Throws exception if expiration date is invalid.

    Parameters

    • Optional expiration: Date

      Token expiration date. Default: No expiration.

    Returns Promise<string>

  • Description

    Lists the tokens of the authenticated user.

    Returns

    Returns an array with the user's tokens.

    Throws

    Throws an exception if an error occurs when listing the tokens.

    Throws

    Throws exception if token is invalid.

    Returns Promise<string[]>

  • Description

    Removes a user from HSM.

    Returns

    Returns true if the user was successfully removed.

    Throws

    Throws an exception if an error occurs when removing the user.

    Throws

    Throws exception if userId is invalid.

    Parameters

    • userId: string

      User identifier in the HSM. Maximum size of MAX_USR_LEN.

    Returns Promise<boolean>

  • Description

    Revoke an authenticated user's token.

    Returns

    Returns true if the token was successfully revoked.

    Throws

    Throws exception if an error occurs when revoking the token.

    Throws

    Throws exception if token is invalid.

    Parameters

    • token: string

      Token to be revoked. The token generated by the generateToken method or returned by the listTokens method.

    Returns Promise<boolean>

  • Description

    Unlocks a user in HSM.

    Parameters

    • userId: string

      User identifier in the HSM. Maximum size of MAX_USR_LEN.

    Returns Promise<boolean>