[KEYCLOAK-405] - Feature that doesn't allow old password to be reused

This commit is contained in:
girirajsharma committed 2015-04-15 02:08:05 +05:30
1 parent 375d061f58
commit e3bb61248a
19 files changed
+551 -97

No files matched your search

@@ -657,6 +657,8 @@ public class UsersResource {
UserCredentialModel cred = RepresentationToModel.convertCredential(pass);
try {
session.users().updateCredential(realm, user, cred);
} catch (IllegalStateException ise) {
throw new BadRequestException("Resetting to N old passwords is not allowed.");
} catch (ModelReadOnlyException mre) {
throw new BadRequestException("Can't reset password as account is read only");
}