Top Inners Fields Constructors Methods
org.keycloak.common

public Class Profile

extends Object
Class Inheritance
Imports
org.jboss.logging.Logger, org.keycloak.common.Profile.Feature.Type, org.keycloak.common.profile.ProfileConfigResolver, .ProfileConfigResolver.FeatureConfig, .ProfileException, org.keycloak.common.util.KerberosJdkProvider, java.util.Arrays, .Collections, .Comparator, .HashMap, .HashSet, .LinkedHashMap, .Map, .Objects, .Set, .TreeSet, java.util.stream.Collectors, .Stream

Author
Bill Burke
Version
$Revision: 1 $

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
public static enum

Field Summary

Modifier and TypeField and Description
private static Profile
private static final Set<String>
private static volatile Map<String, TreeSet<Profile.Feature>>
private final Map<Profile.Feature, Boolean>
private static final Logger
private final Profile.ProfileName

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Profile
public static Profile
public Set<Profile.Feature>
public static Set<String>
public Set<Profile.Feature>
public static Set<String>
public Set<Profile.Feature>
public Set<Profile.Feature>
private static ProfileConfigResolver.FeatureConfig
getFeatureConfig(String unversionedFeature, ProfileConfigResolver... resolvers)

public Set<Profile.Feature>
public Map<Profile.Feature, Boolean>
public static Set<Profile.Feature>
getFeatureVersions(String feature)

Get all of the feature versions for the given feature.

public static Profile
public Profile.ProfileName
private static Map<String, TreeSet<Profile.Feature>>
getOrderedFeatures()

Compute a map of unversioned feature keys to ordered sets (highest first) of features.

public Set<Profile.Feature>

Returns:

all features of type "preview" or "preview_disabled_by_default"
getPreviewFeatures
()

public static Profile
init(Profile.ProfileName profileName, Map<Profile.Feature, Boolean> features)

private static boolean
public static boolean
private void
private void
private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CURRENTback to summary
private static Profile CURRENT
ESSENTIAL_FEATURESback to summary
private static final Set<String> ESSENTIAL_FEATURES
FEATURESback to summary
private static volatile Map<String, TreeSet<Profile.Feature>> FEATURES
featuresback to summary
private final Map<Profile.Feature, Boolean> features
loggerback to summary
private static final Logger logger
profileNameback to summary
private final Profile.ProfileName profileName

Constructor Detail

Profileback to summary
private Profile(Profile.ProfileName profileName, Map<Profile.Feature, Boolean> features)

Method Detail

configureback to summary
public static Profile configure(ProfileConfigResolver... resolvers)
defaultsback to summary
public static Profile defaults()
getAllFeaturesback to summary
public Set<Profile.Feature> getAllFeatures()
getAllUnversionedFeatureNamesback to summary
public static Set<String> getAllUnversionedFeatureNames()
getDeprecatedFeaturesback to summary
public Set<Profile.Feature> getDeprecatedFeatures()
getDisableableUnversionedFeatureNamesback to summary
public static Set<String> getDisableableUnversionedFeatureNames()
getDisabledFeaturesback to summary
public Set<Profile.Feature> getDisabledFeatures()
getExperimentalFeaturesback to summary
public Set<Profile.Feature> getExperimentalFeatures()
getFeatureConfigback to summary
private static ProfileConfigResolver.FeatureConfig getFeatureConfig(String unversionedFeature, ProfileConfigResolver... resolvers)
getFeaturesback to summary
public Set<Profile.Feature> getFeatures(Profile.Feature.Type type)
getFeaturesback to summary
public Map<Profile.Feature, Boolean> getFeatures()
getFeatureVersionsback to summary
public static Set<Profile.Feature> getFeatureVersions(String feature)

Get all of the feature versions for the given feature. They will be ordered by priority.

If the feature does not exist an empty collection will be returned.

getInstanceback to summary
public static Profile getInstance()
getNameback to summary
public Profile.ProfileName getName()
getOrderedFeaturesback to summary
private static Map<String, TreeSet<Profile.Feature>> getOrderedFeatures()

Compute a map of unversioned feature keys to ordered sets (highest first) of features. The priority order for features is:

  • The highest default supported version
  • The highest non-default supported version
  • The highest deprecated version
  • The highest preview version
  • The highest experimental version

      Note the Type enum is ordered based upon priority.

getPreviewFeaturesback to summary
public Set<Profile.Feature> getPreviewFeatures()
Returns:Set<Profile.Feature>

all features of type "preview" or "preview_disabled_by_default"

initback to summary
public static Profile init(Profile.ProfileName profileName, Map<Profile.Feature, Boolean> features)
isEnabledByDefaultback to summary
private static boolean isEnabledByDefault(Profile.ProfileName profile, Profile.Feature f)
isFeatureEnabledback to summary
public static boolean isFeatureEnabled(Profile.Feature feature)
logUnsupportedFeaturesback to summary
private void logUnsupportedFeatures()
logUnsupportedFeaturesback to summary
private void logUnsupportedFeatures(Profile.Feature.Type type, Set<Profile.Feature> checkedFeatures, Logger.Level level)
verifyConfigback to summary
private static void verifyConfig(Map<Profile.Feature, Boolean> features)
org.keycloak.common back to summary

public final Enum Profile.Feature

extends Enum<Profile.Feature>
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
public static final Profile.Feature
ACCOUNT2

Deprecated
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
private Set<Profile.Feature>
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
private final String
private final String
public static final Profile.Feature
LINKEDIN_OAUTH

Deprecated
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
public static final Profile.Feature
private final Profile.Feature.Type
private final String
public static final Profile.Feature
private int
public static final Profile.Feature

Constructor Summary

AccessConstructor and Description
private
Feature(String label, Profile.Feature.Type type, Profile.Feature... dependencies)

private
Feature(String label, Profile.Feature.Type type, int version, Profile.Feature... dependencies)

allowNameKey should be false for new versioned features to disallow using a legacy name, like account2

Method Summary

Modifier and TypeMethod and Description
public Set<Profile.Feature>
public String
getKey()

Get the key that uniquely identifies this feature, may be used by users if allowNameKey is true.

public String
public Profile.Feature.Type
public String
getUnversionedKey()

Return the key without any versioning.

public int
public String
getVersionedKey()

Return the key in the form key:v{version}

public static Profile.Feature
public static Profile.Feature[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ACCOUNT2back to summary
public static final Profile.Feature ACCOUNT2

Deprecated

Annotations
@Deprecated
ACCOUNT3back to summary
public static final Profile.Feature ACCOUNT3
ACCOUNT_APIback to summary
public static final Profile.Feature ACCOUNT_API
ADMIN2back to summary
public static final Profile.Feature ADMIN2
ADMIN_APIback to summary
public static final Profile.Feature ADMIN_API
ADMIN_FINE_GRAINED_AUTHZback to summary
public static final Profile.Feature ADMIN_FINE_GRAINED_AUTHZ
AUTHORIZATIONback to summary
public static final Profile.Feature AUTHORIZATION
CIBAback to summary
public static final Profile.Feature CIBA
CLIENT_POLICIESback to summary
public static final Profile.Feature CLIENT_POLICIES
CLIENT_SECRET_ROTATIONback to summary
public static final Profile.Feature CLIENT_SECRET_ROTATION
CLIENT_TYPESback to summary
public static final Profile.Feature CLIENT_TYPES
DECLARATIVE_UIback to summary
public static final Profile.Feature DECLARATIVE_UI
dependenciesback to summary
private Set<Profile.Feature> dependencies
DEVICE_FLOWback to summary
public static final Profile.Feature DEVICE_FLOW
DOCKERback to summary
public static final Profile.Feature DOCKER
DPOPback to summary
public static final Profile.Feature DPOP
DYNAMIC_SCOPESback to summary
public static final Profile.Feature DYNAMIC_SCOPES
FIPSback to summary
public static final Profile.Feature FIPS
HOSTNAME_V1back to summary
public static final Profile.Feature HOSTNAME_V1
IMPERSONATIONback to summary
public static final Profile.Feature IMPERSONATION
JS_ADAPTERback to summary
public static final Profile.Feature JS_ADAPTER
KERBEROSback to summary
public static final Profile.Feature KERBEROS
keyback to summary
private final String key
labelback to summary
private final String label
LINKEDIN_OAUTHback to summary
public static final Profile.Feature LINKEDIN_OAUTH

Deprecated

Annotations
@Deprecated
LOGIN2back to summary
public static final Profile.Feature LOGIN2
MULTI_SITEback to summary
public static final Profile.Feature MULTI_SITE
OFFLINE_SESSION_PRELOADINGback to summary
public static final Profile.Feature OFFLINE_SESSION_PRELOADING
OID4VC_VCIback to summary
public static final Profile.Feature OID4VC_VCI
PARback to summary
public static final Profile.Feature PAR
RECOVERY_CODESback to summary
public static final Profile.Feature RECOVERY_CODES
SCRIPTSback to summary
public static final Profile.Feature SCRIPTS
STEP_UP_AUTHENTICATIONback to summary
public static final Profile.Feature STEP_UP_AUTHENTICATION
TOKEN_EXCHANGEback to summary
public static final Profile.Feature TOKEN_EXCHANGE
TRANSIENT_USERSback to summary
public static final Profile.Feature TRANSIENT_USERS
typeback to summary
private final Profile.Feature.Type type
unversionedKeyback to summary
private final String unversionedKey
UPDATE_EMAILback to summary
public static final Profile.Feature UPDATE_EMAIL
versionback to summary
private int version
WEB_AUTHNback to summary
public static final Profile.Feature WEB_AUTHN

Constructor Detail

Featureback to summary
private Feature(String label, Profile.Feature.Type type, Profile.Feature... dependencies)
Featureback to summary
private Feature(String label, Profile.Feature.Type type, int version, Profile.Feature... dependencies)

allowNameKey should be false for new versioned features to disallow using a legacy name, like account2

Method Detail

getDependenciesback to summary
public Set<Profile.Feature> getDependencies()
getKeyback to summary
public String getKey()

Get the key that uniquely identifies this feature, may be used by users if allowNameKey is true.

getVersionedKey() should instead be shown to users where possible.

getLabelback to summary
public String getLabel()
getTypeback to summary
public Profile.Feature.Type getType()
getUnversionedKeyback to summary
public String getUnversionedKey()

Return the key without any versioning. All features of the same type will share this key.

getVersionback to summary
public int getVersion()
getVersionedKeyback to summary
public String getVersionedKey()

Return the key in the form key:v{version}

valueOfback to summary
public static Profile.Feature valueOf(String name)
valuesback to summary
public static Profile.Feature[] values()
org.keycloak.common back to summary

public final Enum Profile.Feature.Type

extends Enum<Profile.Feature.Type>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final Profile.Feature.Type
public static final Profile.Feature.Type
public static final Profile.Feature.Type
public static final Profile.Feature.Type
private final String
public static final Profile.Feature.Type
public static final Profile.Feature.Type

Constructor Summary

AccessConstructor and Description
private
Type(String label)

Method Summary

Modifier and TypeMethod and Description
public String
public static Profile.Feature.Type
public static Profile.Feature.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DEFAULTback to summary
public static final Profile.Feature.Type DEFAULT
DEPRECATEDback to summary
public static final Profile.Feature.Type DEPRECATED
DISABLED_BY_DEFAULTback to summary
public static final Profile.Feature.Type DISABLED_BY_DEFAULT
EXPERIMENTALback to summary
public static final Profile.Feature.Type EXPERIMENTAL
labelback to summary
private final String label
PREVIEWback to summary
public static final Profile.Feature.Type PREVIEW
PREVIEW_DISABLED_BY_DEFAULTback to summary
public static final Profile.Feature.Type PREVIEW_DISABLED_BY_DEFAULT

Constructor Detail

Typeback to summary
private Type(String label)

Method Detail

getLabelback to summary
public String getLabel()
valueOfback to summary
public static Profile.Feature.Type valueOf(String name)
valuesback to summary
public static Profile.Feature.Type[] values()
org.keycloak.common back to summary

public final Enum Profile.ProfileName

extends Enum<Profile.ProfileName>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final Profile.ProfileName
public static final Profile.ProfileName

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Profile.ProfileName
public static Profile.ProfileName[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DEFAULTback to summary
public static final Profile.ProfileName DEFAULT
PREVIEWback to summary
public static final Profile.ProfileName PREVIEW

Constructor Detail

ProfileNameback to summary
private ProfileName()

Method Detail

valueOfback to summary
public static Profile.ProfileName valueOf(String name)
valuesback to summary
public static Profile.ProfileName[] values()