Package org.keycloak.broker.saml.mappers
Class XPathAttributeMapper
- java.lang.Object
-
- org.keycloak.broker.provider.AbstractIdentityProviderMapper
-
- org.keycloak.broker.saml.mappers.XPathAttributeMapper
-
- All Implemented Interfaces:
IdentityProviderMapper
,SamlMetadataDescriptorUpdater
,ConfiguredProvider
,Provider
,ProviderFactory<IdentityProviderMapper>
public class XPathAttributeMapper extends AbstractIdentityProviderMapper implements SamlMetadataDescriptorUpdater
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTRIBUTE_FRIENDLY_NAME
static String
ATTRIBUTE_NAME
static String
ATTRIBUTE_XPATH
static String[]
COMPATIBLE_PROVIDERS
static String
PROVIDER_ID
static String
USER_ATTRIBUTE
-
Fields inherited from interface org.keycloak.broker.provider.IdentityProviderMapper
ANY_PROVIDER, DEFAULT_IDENTITY_PROVIDER_MAPPER_SYNC_MODES
-
-
Constructor Summary
Constructors Constructor Description XPathAttributeMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getCompatibleProviders()
List<ProviderConfigProperty>
getConfigProperties()
String
getDisplayCategory()
String
getDisplayType()
String
getHelpText()
String
getId()
void
preprocessFederatedIdentity(KeycloakSession session, RealmModel realm, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)
Called to determine what keycloak username and email to use to process the login request from the external IDP.boolean
supportsSyncMode(IdentityProviderSyncMode syncMode)
void
updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)
Called when this user has logged in before and has already been imported.void
updateMetadata(IdentityProviderMapperModel mapperModel, EntityDescriptorType entityDescriptor)
-
Methods inherited from class org.keycloak.broker.provider.AbstractIdentityProviderMapper
close, create, importNewUser, init, postInit, updateBrokeredUserLegacy
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.provider.ConfiguredProvider
getConfig
-
Methods inherited from interface org.keycloak.provider.ProviderFactory
getConfigMetadata, order
-
-
-
-
Field Detail
-
COMPATIBLE_PROVIDERS
public static final String[] COMPATIBLE_PROVIDERS
-
ATTRIBUTE_XPATH
public static final String ATTRIBUTE_XPATH
- See Also:
- Constant Field Values
-
ATTRIBUTE_NAME
public static final String ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
ATTRIBUTE_FRIENDLY_NAME
public static final String ATTRIBUTE_FRIENDLY_NAME
- See Also:
- Constant Field Values
-
USER_ATTRIBUTE
public static final String USER_ATTRIBUTE
- See Also:
- Constant Field Values
-
PROVIDER_ID
public static final String PROVIDER_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
supportsSyncMode
public boolean supportsSyncMode(IdentityProviderSyncMode syncMode)
- Specified by:
supportsSyncMode
in interfaceIdentityProviderMapper
-
getConfigProperties
public List<ProviderConfigProperty> getConfigProperties()
- Specified by:
getConfigProperties
in interfaceConfiguredProvider
-
getId
public String getId()
- Specified by:
getId
in interfaceProviderFactory<IdentityProviderMapper>
-
getCompatibleProviders
public String[] getCompatibleProviders()
- Specified by:
getCompatibleProviders
in interfaceIdentityProviderMapper
-
getDisplayCategory
public String getDisplayCategory()
- Specified by:
getDisplayCategory
in interfaceIdentityProviderMapper
-
getDisplayType
public String getDisplayType()
- Specified by:
getDisplayType
in interfaceIdentityProviderMapper
-
preprocessFederatedIdentity
public void preprocessFederatedIdentity(KeycloakSession session, RealmModel realm, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)
Description copied from interface:IdentityProviderMapper
Called to determine what keycloak username and email to use to process the login request from the external IDP. It's called before "FirstBrokerLogin" flow, so can be used to map attributes to BrokeredIdentityContext ( BrokeredIdentityContext.setUserAttribute ), which will be available on "Review Profile" page and in authenticators during FirstBrokerLogin flow- Specified by:
preprocessFederatedIdentity
in interfaceIdentityProviderMapper
- Overrides:
preprocessFederatedIdentity
in classAbstractIdentityProviderMapper
-
updateBrokeredUser
public void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)
Description copied from interface:IdentityProviderMapper
Called when this user has logged in before and has already been imported.- Specified by:
updateBrokeredUser
in interfaceIdentityProviderMapper
- Overrides:
updateBrokeredUser
in classAbstractIdentityProviderMapper
-
getHelpText
public String getHelpText()
- Specified by:
getHelpText
in interfaceConfiguredProvider
-
updateMetadata
public void updateMetadata(IdentityProviderMapperModel mapperModel, EntityDescriptorType entityDescriptor)
- Specified by:
updateMetadata
in interfaceSamlMetadataDescriptorUpdater
-
-