If the user should change the password, it is recommended to check new password correspondence with the requirements that are set in security settings.
To manually check the password, execute request using the "check_new_password" API method:
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Bearer <user token>" -d '{"new_password":"<new password>"}' "<IP address or server DNS name>/api/v1/accounts/current_user/check_new_password/"
Example of positive check response (code 200):
"password is valid"
Example of negative check response (code 400):
{
"__all__": [
"Password must contain at least one special character: ,.<>/?;:'\"[]{}\\`~!@#$%^&*()-_+="
]
}
See also: