I set up a keycloak server with LDAP users to take advantage of the SSO on my applications. I would like to change the password of the logged in user on my application through the Keycloak API. So, in the future, my Angular application will be able to make a request to the keycloak API to change the password of the logged-in user.
So I tried to do what is indicated in the documentation (method PUT, reset-password) but without success ... I did my tests with postman, I wonder if my token is the one to be used? Does the problem come from elsewhere?
I have this url :
PUT
{url}/auth/admin/realms/{realm}/users/{id user}/reset-password/
I have this header :
Content-type
application/json
i have this body :
{
"pass" : {
"type": "password",
"temporary": false,
"value": "my-new-password"
}
}
I get a 401 error if I did not try to renew the token quickly (which makes me say that the problem may not come from the token) and I get a 403 or 400 error when I got a new token via postman oAuth 2.0
I sometimes get this message:
Unrecognized field "pass" (class org.keycloak.representations.idm.CredentialRepresentation), not marked as ignorable
Please, help me !
You can see here my autorization in postman, i don't know what is "State"