[keycloak-user] reset password over REST request.

Stian Thorgersen stian at redhat.com
Thu Oct 9 03:23:54 EDT 2014


If the admin user is in the master realm (admin realm role or manage-user on the <realm name>-realm app):

  http://docs.jboss.org/keycloak/docs/1.0.2.Final/userguide/html/admin-permissions.html

If the admin user is in the same realm as the user (manage-users on the realm-management app):

  http://docs.jboss.org/keycloak/docs/1.0.2.Final/userguide/html/per-realm-admin-permissions.html

----- Original Message -----
> From: "Сергій Дзюбін" <kotychok at gmail.com>
> To: keycloak-user at lists.jboss.org
> Sent: Wednesday, 8 October, 2014 9:43:10 PM
> Subject: [keycloak-user] reset password over REST request.
> 
> Hello. What is the role of a user to reset a password of another user by
> calling a REST request: /reset-passschord?
> For example:
> $scope.setCredential = function(loginname) {
> $http.put("/admin/realms/" + auth.authz.realm +
> "/users/"+loginname+"/reset-password",{PASSWORD : loginname, SECRET :
> loginname, temporary : true }).success(function() {
> console.log("Reset password to temporary OK!");
> })
> };
> 
> $scope.createUser = function() {
> $http.post(" http://localhost-auth:8080/auth/admin/realms/ " +
> auth.authz.realm + "/users",{username:"bob", enabled: true,
> firstName:"Bob",lastName:"Ivanov",emailVerified:false}).success(function() {
> $scope.setCredential("bob");
> });
> };
> Thank you.
> 
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user



More information about the keycloak-user mailing list