Class DefaultRequiredActions

java.lang.Object
org.keycloak.models.utils.DefaultRequiredActions

public class DefaultRequiredActions extends Object
Version:
$Revision: 1 $
Author:
Bill Burke
  • Constructor Details

    • DefaultRequiredActions

      public DefaultRequiredActions()
  • Method Details

    • isActionAvailable

      public static boolean isActionAvailable(RequiredActionProviderModel action)
      Check whether the action is the default one used in a realm and is available in the application Often, the default actions can be disabled due to the fact a particular feature is disabled
      Parameters:
      action - required action
      Returns:
      true if the required action is the default one and is available
    • addActions

      public static void addActions(RealmModel realm)
      Add default required actions to the realm
      Parameters:
      realm - realm
    • addAction

      public static void addAction(RealmModel realm, DefaultRequiredActions.Action action)
      Add default required action to the realm
      Parameters:
      realm - realm
      action - particular required action
    • addVerifyEmailAction

      public static void addVerifyEmailAction(RealmModel realm)
    • addUpdateProfileAction

      public static void addUpdateProfileAction(RealmModel realm)
    • addConfigureTotpAction

      public static void addConfigureTotpAction(RealmModel realm)
    • addUpdatePasswordAction

      public static void addUpdatePasswordAction(RealmModel realm)
    • addTermsAndConditionsAction

      public static void addTermsAndConditionsAction(RealmModel realm)
    • addDeleteAccountAction

      public static void addDeleteAccountAction(RealmModel realm)
    • addUpdateLocaleAction

      public static void addUpdateLocaleAction(RealmModel realm)
    • addUpdateEmailAction

      public static void addUpdateEmailAction(RealmModel realm)
    • addRecoveryAuthnCodesAction

      public static void addRecoveryAuthnCodesAction(RealmModel realm)
    • addWebAuthnRegisterAction

      public static void addWebAuthnRegisterAction(RealmModel realm)
    • addWebAuthnPasswordlessRegisterAction

      public static void addWebAuthnPasswordlessRegisterAction(RealmModel realm)
    • getDefaultRequiredActionCaseInsensitively

      public static String getDefaultRequiredActionCaseInsensitively(String providerId)
      Checks whether given providerId case insensitively matches any of UserModel.RequiredAction enum and if yes, it returns the value in correct form.

      This is necessary to stay backward compatible with older deployments where not all provider factories had ids in uppercase. This means that storage can contain some values in incorrect letter-case.

      Parameters:
      providerId - the required actions providerId
      Returns:
      providerId with correct letter-case, or the original value if it doesn't match any of UserModel.RequiredAction