[keycloak-user] Credential Representation TOTP example

Thomas Darimont thomas.darimont at googlemail.com
Thu Mar 9 17:53:35 EST 2017


The UsersResource#updateUser endpoint doesn't support credential updates at
the moment.

org.keycloak.services.resources.admin.UsersResource#updateUser
org.keycloak.services.resources.admin.UsersResource#updateUserFromRep

E.g. if you want to update a password you need to use the resetPassword
endpoint:

CredentialRepresentation passwordCred = new CredentialRepresentation();
passwordCred.setTemporary(false);
passwordCred.setType(CredentialRepresentation.PASSWORD);
passwordCred.setValue("test");

keycloak.realm(realmName).users().get(userId).resetPassword(passwordCred);


More information about the keycloak-user mailing list