i'm building angularjs application protected keycloak. each user should update password within user profile.
calling keycloak api password
get /auth/realms/{realm_name}/account/password
returns html content keycloak. build own form update user's password.
in keycloak documentation found
post /auth/realms/{realm_name}/account/password
which requires attributes
{ 'password' => user's current password 'password-new' => new password 'password-confirm' => new password again 'statechecker' => token keycloak } calling
post /auth/realms/{realm_name}/account/password
without 'statechecker' attribute causes error. attribute needed.
so here questions:
- how value
statecheckerkeycloak logged in user (in keycloak it's in hidden input field)? - is there possibility change user's password rest api call?
thanks in advance.
note:
calling:
post /auth/realms/{realm_name}/account/password
with hard coded attributes , values
{ 'password': 'somepasswd', 'password-new': 'somenewpasswd', 'password-confirm': 'somenewpasswd', 'statechecker': '<token copied , pasted keycloak>', } is working!
my advice overwrite keycloak theme (check out: http://docs.jboss.org/keycloak/docs/1.2.0.beta1/userguide/html/themes.html).
you can extend , modify existing forms rest of application.
Comments
Post a Comment