PasswordReset.change_password - REST API

Overview

Invoked as the last step in the password reset process to let the user change his or her password.

Accepts the initial token received by the user in email, the reset key received in the previous step and a new password that should be set for the user.

  • HTTP method: DELETE
  • URL path: /zato/sso/password/reset

Request

NameDatatypeOptionalNotes
tokenstring---Password reset token as it was received by the user in email
reset_keystring---Reset key received by the application in the previous step, when the token was initially accessed
current_appstring---Name of application that the call is attempted from

Response

NameDatatypeOptionalNotes
cidstring---Correlation ID assigned to request
statusstring---Overall status code
sub_statuslistYesReturned only if status is not "ok", a list of error or warning codes
reset_keystringYesA reset key to be used in the next step to change the password. Returned only if status is OK.

Usage

Token is valid:

$ curl -XDELETE localhost:17010/zato/sso/password/reset -d '
  {
    "password": "Ytj8~zQ--3O9hbNU",
    "token": "2b2tycmz98bcszpasanjg45h6",
    "reset_key": "gAAAAABgrLzSMBtSa-FY88-1nUSJFZcBXdXwWci...",
    "current_app": "CRM"
  }
  '

{
  "cid": "2eb48bf0139c03274c53495d",
  "status": "ok",
  "reset_key": "gAAAAABgrLzSMBtSa-FY88-1nUSJFZcBX...",
  "sub_status": []
}
$

Token or reset key are invalid (e.g. already used or expired):

$ curl -XDELETE localhost:17010/zato/sso/password/reset -d '
  {
    "password": "Ytj8~zQ--3O9hbNU",
    "token": "2b2tycmz98bcszpasanjg45h6",
    "reset_key": "gAAAAABgrLzSMBtSa-FY88-1nUSJFZcBXdXwWci...",
    "current_app": "CRM"
  }
  '

{
  "cid": "6b39a592f6ddb6080b929f4c",
  "status": "error",
  "sub_status": ["E010001"]
}
$

Password does not match the site's complexity rules (too simple):

$ curl -XDELETE localhost:17010/zato/sso/password/reset -d '
  {
    "password": "abcdef",
    "token": "2b2tycmz98bcszpasanjg45h6",
    "reset_key": "gAAAAABgrLzSMBtSa-FY88-1nUSJFZcBXdXwWci...",
    "current_app": "CRM"
  }
  '

{
  "cid": "94ad25ac78d7eebc6349d37c",
  "status": "error",
  "sub_status": ["E003008"]
}
$