If the admin user is in the master realm (admin realm role or manage-user on the <realm
name>-realm app):
If the admin user is in the same realm as the user (manage-users on the realm-management
app):
From: "Сергій Дзюбін" <kotychok(a)gmail.com>
To: keycloak-user(a)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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user