Package org.keycloak.models.utils
Class DefaultRequiredActions
- java.lang.Object
-
- org.keycloak.models.utils.DefaultRequiredActions
-
public class DefaultRequiredActions extends Object
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultRequiredActions.Action
-
Constructor Summary
Constructors Constructor Description DefaultRequiredActions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addAction(RealmModel realm, DefaultRequiredActions.Action action)
Add default required action to the realmstatic void
addActions(RealmModel realm)
Add default required actions to the realmstatic void
addConfigureTotpAction(RealmModel realm)
static void
addDeleteAccountAction(RealmModel realm)
static void
addRecoveryAuthnCodesAction(RealmModel realm)
static void
addTermsAndConditionsAction(RealmModel realm)
static void
addUpdateEmailAction(RealmModel realm)
static void
addUpdateLocaleAction(RealmModel realm)
static void
addUpdatePasswordAction(RealmModel realm)
static void
addUpdateProfileAction(RealmModel realm)
static void
addVerifyEmailAction(RealmModel realm)
static void
addWebAuthnPasswordlessRegisterAction(RealmModel realm)
static void
addWebAuthnRegisterAction(RealmModel realm)
static String
getDefaultRequiredActionCaseInsensitively(String providerId)
Checks whether givenproviderId
case insensitively matches any ofUserModel.RequiredAction
enum and if yes, it returns the value in correct form.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
-
-
-
Method Detail
-
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
- realmaction
- 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 givenproviderId
case insensitively matches any ofUserModel.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
-
-