From b45f5980e038fb5c4a41a689c8634ee65cd76e1d Mon Sep 17 00:00:00 2001 From: Captain-P-Goldfish Date: Mon, 16 Sep 2019 08:19:22 +0200 Subject: [PATCH] Make password policy identifiers public If a password policy should be modified prgorammatically the constant key identifiers to set the values should be accessible globally --- .../keycloak/policy/DigitsPasswordPolicyProviderFactory.java | 2 +- .../keycloak/policy/LengthPasswordPolicyProviderFactory.java | 2 +- .../policy/NotUsernamePasswordPolicyProviderFactory.java | 2 +- .../policy/RegexPatternsPasswordPolicyProviderFactory.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server-spi-private/src/main/java/org/keycloak/policy/DigitsPasswordPolicyProviderFactory.java b/server-spi-private/src/main/java/org/keycloak/policy/DigitsPasswordPolicyProviderFactory.java index d7fce9c471..e008428f14 100644 --- a/server-spi-private/src/main/java/org/keycloak/policy/DigitsPasswordPolicyProviderFactory.java +++ b/server-spi-private/src/main/java/org/keycloak/policy/DigitsPasswordPolicyProviderFactory.java @@ -26,7 +26,7 @@ import org.keycloak.models.KeycloakSessionFactory; */ public class DigitsPasswordPolicyProviderFactory implements PasswordPolicyProviderFactory { - static final String ID = "digits"; + public static final String ID = "digits"; @Override public String getId() { diff --git a/server-spi-private/src/main/java/org/keycloak/policy/LengthPasswordPolicyProviderFactory.java b/server-spi-private/src/main/java/org/keycloak/policy/LengthPasswordPolicyProviderFactory.java index a60c250ed3..f9e417eca7 100644 --- a/server-spi-private/src/main/java/org/keycloak/policy/LengthPasswordPolicyProviderFactory.java +++ b/server-spi-private/src/main/java/org/keycloak/policy/LengthPasswordPolicyProviderFactory.java @@ -26,7 +26,7 @@ import org.keycloak.models.KeycloakSessionFactory; */ public class LengthPasswordPolicyProviderFactory implements PasswordPolicyProviderFactory { - static final String ID = "length"; + public static final String ID = "length"; @Override public String getId() { diff --git a/server-spi-private/src/main/java/org/keycloak/policy/NotUsernamePasswordPolicyProviderFactory.java b/server-spi-private/src/main/java/org/keycloak/policy/NotUsernamePasswordPolicyProviderFactory.java index 30ebbff756..be7f993ff0 100644 --- a/server-spi-private/src/main/java/org/keycloak/policy/NotUsernamePasswordPolicyProviderFactory.java +++ b/server-spi-private/src/main/java/org/keycloak/policy/NotUsernamePasswordPolicyProviderFactory.java @@ -26,7 +26,7 @@ import org.keycloak.models.KeycloakSessionFactory; */ public class NotUsernamePasswordPolicyProviderFactory implements PasswordPolicyProviderFactory { - static final String ID = "notUsername"; + public static final String ID = "notUsername"; @Override public String getId() { diff --git a/server-spi-private/src/main/java/org/keycloak/policy/RegexPatternsPasswordPolicyProviderFactory.java b/server-spi-private/src/main/java/org/keycloak/policy/RegexPatternsPasswordPolicyProviderFactory.java index c0ce732fba..f43192433f 100644 --- a/server-spi-private/src/main/java/org/keycloak/policy/RegexPatternsPasswordPolicyProviderFactory.java +++ b/server-spi-private/src/main/java/org/keycloak/policy/RegexPatternsPasswordPolicyProviderFactory.java @@ -26,7 +26,7 @@ import org.keycloak.models.KeycloakSessionFactory; */ public class RegexPatternsPasswordPolicyProviderFactory implements PasswordPolicyProviderFactory { - static final String ID = "regexPattern"; + public static final String ID = "regexPattern"; @Override public String getId() {