Package org.keycloak.userprofile
Enum Class UserProfileContext
- All Implemented Interfaces:
Serializable
,Comparable<UserProfileContext>
,Constable
This interface represents the different contexts from where user profiles are managed. The core contexts are already available here representing the different areas in Keycloak where user profiles are managed.
The context is crucial to drive the conditions that should be respected when managing user profiles. It might be possible to include in the future metadata about contexts. As well as support custom contexts.
- Author:
- Markus Till
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIn this context, a user profile is managed by themselves through the account console.In this context, a user profile is managed by themselves when authenticating through a broker.In this context, a user profile is managed by themselves when registering to a realm.In this context, a user profile is managed by themselves when updating their email through an application initiated action.In this context, a user profile is managed by themselves during an authentication flow such as when updating the user profile.In this context, a user profile is managed through the management interface such as the Admin API. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
isAttributeSupported
(String name) boolean
boolean
isRoleForContext
(Set<String> roles) Check if roles configuration contains role for this context.static UserProfileContext
Returns the enum constant of this class with the specified name.static UserProfileContext[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UPDATE_PROFILE
In this context, a user profile is managed by themselves during an authentication flow such as when updating the user profile. -
USER_API
In this context, a user profile is managed through the management interface such as the Admin API. -
ACCOUNT
In this context, a user profile is managed by themselves through the account console. -
IDP_REVIEW
In this context, a user profile is managed by themselves when authenticating through a broker. -
REGISTRATION
In this context, a user profile is managed by themselves when registering to a realm. -
UPDATE_EMAIL
In this context, a user profile is managed by themselves when updating their email through an application initiated action. In this context, only theUserModel.EMAIL
attribute is supported.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isAdminContext
public boolean isAdminContext()- Returns:
- true means that this context is applicable to administrators. False means that this context is applicable to regular users
-
canBeAuthFlowContext
public boolean canBeAuthFlowContext()- Returns:
- true if context CAN BE part of the authentication flow
-
isResetEmailVerified
public boolean isResetEmailVerified()- Returns:
- true means that UserModel.emailVerified flag must be reset to false in this context when email address is updated
-
isRoleForContext
Check if roles configuration contains role for this context.- Parameters:
roles
- to be inspected- Returns:
- true if roles list contains role representing checked context
-
isAttributeSupported
-