Class PasswordPolicy

java.lang.Object
org.keycloak.models.PasswordPolicy
All Implemented Interfaces:
Serializable

public class PasswordPolicy extends Object implements Serializable
Author:
Stian Thorgersen
See Also:
  • Field Details

  • Method Details

    • empty

      public static PasswordPolicy empty()
    • build

      public static PasswordPolicy.Builder build()
    • parse

      public static PasswordPolicy parse(KeycloakSession session, String policyString)
    • getPolicies

      public Set<String> getPolicies()
    • getPolicyConfig

      public <T> T getPolicyConfig(String key)
    • getHashAlgorithm

      public String getHashAlgorithm()
    • getHashIterations

      public int getHashIterations()
    • getExpiredPasswords

      public int getExpiredPasswords()
    • getPasswordAgeInDays

      public int getPasswordAgeInDays()
    • getDaysToExpirePassword

      public int getDaysToExpirePassword()
    • getRecoveryCodesWarningThreshold

      public int getRecoveryCodesWarningThreshold()
    • getMaxAuthAge

      public int getMaxAuthAge()
      Policy to configure the maximum age of the authentication in seconds. If the user authentication is older than the given value, a reauthentication is enforced. Examples:
      • maxAuthAge(0) means the user has to reauthenticate immediately.
      • maxAuthAge(60) means the user has to reauthenticate if authentication is older than 60 seconds.
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toBuilder

      public PasswordPolicy.Builder toBuilder()