Blog
Changes a user's password.
If UST only is on input, without user_id, user whose session it is will change his or her password.
If user_id is on input, another user, identified by that ID, will have the password changed - in this case the input UST must belong to a super-user's session.
The new password is always validated against the configuruation.
Name | Datatype | Optional | Needs super-user | Notes |
---|---|---|---|---|
ust | string | --- | --- | Current user's session token (UST) |
current_app | string | --- | --- | Name of application that the call is attempted from |
old_password | string | Yes | --- | Required if current user changes his or her own password |
new_password | string | --- | --- | New password to set for user |
user_id | string | Yes | Yes | ID of user whose password is to be changed, required if a super-user wants to change another person's password |
password_expiry | integer | Yes | Yes | Optionally, after how many days from current time the password will expire. If not set, a default value from configuration will be used. |
must_change | bool | Yes | Yes | If True, the person whose password is being change will need to reset it on next login |
Name | Datatype | Optional | Notes |
---|---|---|---|
cid | string | --- | Correlation ID assigned to request |
status | string | --- | Overall status code |
sub_status | list | Yes | Returned only if status is not "ok", a list of error or warning codes |
$ curl -XPATCH localhost:17010/zato/sso/user -d '
{
"ust": "gAAAAABalTpNLXP6Xk_KN_SE...",
"current_app": "CRM",
"old_password": "waHsAlUbA1XmU2zQrlTHXeDCvb6Urgn",
"new_password": "p1GwvkP3cHTum7lIMz7SDitmp8fT8Mo",
}
'
{
"cid": "6f916246696fbdd76f8a7073",
"status": "ok"
}
$