public class DeclarativeUserProfileProvider extends AbstractUserProfileProvider<DeclarativeUserProfileProvider> implements AmphibianProviderFactory<DeclarativeUserProfileProvider>, EnvironmentDependentProviderFactory
UserProfileProvider loading configuration from the changeable JSON file stored in component config. Parsed
configuration is cached.| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
static String |
SYSTEM_DEFAULT_CONFIG_RESOURCE |
static String |
UP_PIECES_COUNT_COMPONENT_CONFIG_KEY |
contextualMetadataRegistry, session| Constructor and Description |
|---|
DeclarativeUserProfileProvider() |
DeclarativeUserProfileProvider(KeycloakSession session,
Map<UserProfileContext,UserProfileMetadata> metadataRegistry,
String defaultRawConfig) |
close, configureUserProfile, create, create, create, create, getRegexPatternString, initclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, create, create, onUpdate, preRemovegetCommonProviderConfigProperties, getTypeMetadata, onCreateinit, orderpublic static final String SYSTEM_DEFAULT_CONFIG_RESOURCE
public static final String ID
public static final String UP_PIECES_COUNT_COMPONENT_CONFIG_KEY
public DeclarativeUserProfileProvider()
public DeclarativeUserProfileProvider(KeycloakSession session, Map<UserProfileContext,UserProfileMetadata> metadataRegistry, String defaultRawConfig)
public String getId()
getId in interface ProviderFactory<DeclarativeUserProfileProvider>protected DeclarativeUserProfileProvider create(KeycloakSession session, Map<UserProfileContext,UserProfileMetadata> metadataRegistry)
AbstractUserProfileProviderUserProfileProvider.create in class AbstractUserProfileProvider<DeclarativeUserProfileProvider>session - the sessionmetadataRegistry - the profile metadataprotected Attributes createAttributes(UserProfileContext context, Map<String,?> attributes, UserModel user, UserProfileMetadata metadata)
createAttributes in class AbstractUserProfileProvider<DeclarativeUserProfileProvider>protected UserProfileMetadata configureUserProfile(UserProfileMetadata metadata, KeycloakSession session)
AbstractUserProfileProviderconfigureUserProfile in class AbstractUserProfileProvider<DeclarativeUserProfileProvider>metadata - the profile metadatapublic String getHelpText()
getHelpText in interface ConfiguredProviderpublic void validateConfiguration(KeycloakSession session, RealmModel realm, ComponentModel model) throws ComponentValidationException
validateConfiguration in interface ComponentFactory<DeclarativeUserProfileProvider,DeclarativeUserProfileProvider>ComponentValidationExceptionpublic String getConfiguration()
getConfiguration in interface UserProfileProvidergetConfiguration in class AbstractUserProfileProvider<DeclarativeUserProfileProvider>public void setConfiguration(String configuration)
setConfiguration in interface UserProfileProvidersetConfiguration in class AbstractUserProfileProvider<DeclarativeUserProfileProvider>public void postInit(KeycloakSessionFactory factory)
postInit in interface ProviderFactory<DeclarativeUserProfileProvider>postInit in class AbstractUserProfileProvider<DeclarativeUserProfileProvider>public List<ProviderConfigProperty> getConfigProperties()
getConfigProperties in interface AmphibianProviderFactory<DeclarativeUserProfileProvider>getConfigProperties in interface ConfiguredProviderpublic ComponentModel getComponentModel()
protected UserProfileMetadata decorateUserProfileForCache(UserProfileMetadata metadata, ComponentModel model)
AbstractUserProfileProvider based on 'per realm' configuration.
This method is called for each UserProfileContext in each realm, and metadata are cached then and this
method is called again only if configuration changes.metadata - base to be decorated based on configuration loaded from component modelmodel - component model to get "per realm" configuration fromprotected UPConfig getParsedConfig(ComponentModel model)
model - to take config fromprotected AttributeValidatorMetadata createConfiguredValidator(String validator, Map<String,Object> validatorConfig)
validator - id to create validator forvalidatorConfig - of the validatorpublic boolean isSupported()
isSupported in interface EnvironmentDependentProviderFactoryCopyright © 2021 JBoss by Red Hat. All rights reserved.