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.