public abstract class AbstractUserProfileProvider<U extends UserProfileProvider> extends Object implements UserProfileProvider, UserProfileProviderFactory<U>
A base class for UserProfileProvider implementations providing the main hooks for customizations.
| Modifier and Type | Field and Description |
|---|---|
protected Map<UserProfileContext,UserProfileMetadata> |
contextualMetadataRegistry |
protected KeycloakSession |
session |
| Constructor and Description |
|---|
AbstractUserProfileProvider() |
AbstractUserProfileProvider(KeycloakSession session,
Map<UserProfileContext,UserProfileMetadata> contextualMetadataRegistry) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected UserProfileMetadata |
configureUserProfile(UserProfileMetadata metadata)
Sub-types can override this method to customize how contextual profile metadata is configured at init time.
|
protected UserProfileMetadata |
configureUserProfile(UserProfileMetadata metadata,
KeycloakSession session)
Sub-types can override this method to customize how contextual profile metadata is configured at runtime.
|
U |
create(KeycloakSession session) |
protected abstract U |
create(KeycloakSession session,
Map<UserProfileContext,UserProfileMetadata> metadataRegistry)
Subclasses can override this method to create their instances of
UserProfileProvider. |
UserProfile |
create(UserProfileContext context,
Map<String,?> attributes) |
UserProfile |
create(UserProfileContext context,
Map<String,?> attributes,
UserModel user) |
UserProfile |
create(UserProfileContext context,
UserModel user) |
protected Attributes |
createAttributes(UserProfileContext context,
Map<String,?> attributes,
UserModel user,
UserProfileMetadata metadata) |
String |
getConfiguration() |
static Pattern |
getRegexPatternString(String[] builtinReadOnlyAttributes) |
void |
init(Config.Scope config) |
void |
postInit(KeycloakSessionFactory factory) |
void |
setConfiguration(String configuration) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetId, orderprotected final Map<UserProfileContext,UserProfileMetadata> contextualMetadataRegistry
protected final KeycloakSession session
public AbstractUserProfileProvider()
public AbstractUserProfileProvider(KeycloakSession session, Map<UserProfileContext,UserProfileMetadata> contextualMetadataRegistry)
public static Pattern getRegexPatternString(String[] builtinReadOnlyAttributes)
public UserProfile create(UserProfileContext context, UserModel user)
create in interface UserProfileProviderpublic UserProfile create(UserProfileContext context, Map<String,?> attributes, UserModel user)
create in interface UserProfileProviderpublic UserProfile create(UserProfileContext context, Map<String,?> attributes)
create in interface UserProfileProviderpublic U create(KeycloakSession session)
create in interface ProviderFactory<U extends UserProfileProvider>public void init(Config.Scope config)
init in interface ProviderFactory<U extends UserProfileProvider>public void postInit(KeycloakSessionFactory factory)
postInit in interface ProviderFactory<U extends UserProfileProvider>public void close()
close in interface Providerclose in interface ProviderFactory<U extends UserProfileProvider>public String getConfiguration()
getConfiguration in interface UserProfileProviderpublic void setConfiguration(String configuration)
setConfiguration in interface UserProfileProviderprotected abstract U create(KeycloakSession session, Map<UserProfileContext,UserProfileMetadata> metadataRegistry)
UserProfileProvider.session - the sessionmetadataRegistry - the profile metadataprotected UserProfileMetadata configureUserProfile(UserProfileMetadata metadata)
metadata - the profile metadataprotected UserProfileMetadata configureUserProfile(UserProfileMetadata metadata, KeycloakSession session)
metadata - the profile metadatametadata - the current sessionprotected Attributes createAttributes(UserProfileContext context, Map<String,?> attributes, UserModel user, UserProfileMetadata metadata)
Copyright © 2021 JBoss by Red Hat. All rights reserved.