From 7f499b2833fb1a2f025e90d83c1566abe29b2389 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 3 Dec 2013 12:53:26 +0000 Subject: [PATCH] KEYCLOAK-186 Password policies --- .../admin/partials/realm-credentials.html | 7 + .../idm/RealmRepresentation.java | 9 + .../java/org/keycloak/forms/MessageBean.java | 15 +- .../org/keycloak/service/FormServiceImpl.java | 9 +- .../theme/default/template-login-action.ftl | 6 +- .../forms/theme/default/template-login.ftl | 2 +- .../forms/theme/default/template-main.ftl | 4 +- model/api/pom.xml | 5 + .../org/keycloak/models/PasswordPolicy.java | 182 ++++++++++++++++++ .../java/org/keycloak/models/RealmModel.java | 4 + .../keycloak/models/PasswordPolicyTest.java | 78 ++++++++ .../org/keycloak/models/jpa/RealmAdapter.java | 16 ++ .../models/jpa/entities/RealmEntity.java | 10 + .../models/picketlink/RealmAdapter.java | 17 ++ .../models/picketlink/mappings/RealmData.java | 10 + .../services/managers/RealmManager.java | 9 + .../services/resources/AccountService.java | 5 + .../services/resources/TokenService.java | 4 + .../services/validation/Validation.java | 5 + .../java/org/keycloak/test/ModelTest.java | 2 + .../keycloak/testsuite/forms/AccountTest.java | 30 +++ .../testsuite/forms/RegisterTest.java | 34 ++++ .../testsuite/pages/RegisterPage.java | 6 + 23 files changed, 451 insertions(+), 18 deletions(-) create mode 100644 model/api/src/main/java/org/keycloak/models/PasswordPolicy.java create mode 100644 model/api/src/main/test/java/org/keycloak/models/PasswordPolicyTest.java diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-credentials.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-credentials.html index 3b3c940a17..8b28419d09 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-credentials.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-credentials.html @@ -44,6 +44,13 @@ +
+ + +
+ +
+