Package org.keycloak.broker.oidc.mappers
Class UserAttributeMapper
- java.lang.Object
- 
- org.keycloak.broker.provider.AbstractIdentityProviderMapper
- 
- org.keycloak.broker.oidc.mappers.AbstractClaimMapper
- 
- org.keycloak.broker.oidc.mappers.UserAttributeMapper
 
 
 
- 
- All Implemented Interfaces:
- IdentityProviderMapper,- ConfiguredProvider,- Provider,- ProviderFactory<IdentityProviderMapper>
 
 public class UserAttributeMapper extends AbstractClaimMapper - Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Field SummaryFields Modifier and Type Field Description static String[]COMPATIBLE_PROVIDERSstatic StringEMAILstatic StringFIRST_NAMEstatic StringLAST_NAMEstatic StringPROVIDER_IDstatic StringUSER_ATTRIBUTE- 
Fields inherited from class org.keycloak.broker.oidc.mappers.AbstractClaimMapperCLAIM, CLAIM_VALUE
 - 
Fields inherited from interface org.keycloak.broker.provider.IdentityProviderMapperANY_PROVIDER, DEFAULT_IDENTITY_PROVIDER_MAPPER_SYNC_MODES
 
- 
 - 
Constructor SummaryConstructors Constructor Description UserAttributeMapper()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getCompatibleProviders()List<ProviderConfigProperty>getConfigProperties()StringgetDisplayCategory()StringgetDisplayType()StringgetHelpText()StringgetId()voidpreprocessFederatedIdentity(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.booleansupportsSyncMode(IdentityProviderSyncMode syncMode)voidupdateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)Called when this user has logged in before and has already been imported.- 
Methods inherited from class org.keycloak.broker.oidc.mappers.AbstractClaimMappergetClaimValue, getClaimValue, getClaimValue, hasClaimValue, valueEquals
 - 
Methods inherited from class org.keycloak.broker.provider.AbstractIdentityProviderMapperclose, create, importNewUser, init, postInit, updateBrokeredUserLegacy
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.keycloak.provider.ConfiguredProvidergetConfig
 - 
Methods inherited from interface org.keycloak.provider.ProviderFactorygetConfigMetadata, order
 
- 
 
- 
- 
- 
Field Detail- 
COMPATIBLE_PROVIDERSpublic static final String[] COMPATIBLE_PROVIDERS 
 - 
USER_ATTRIBUTEpublic static final String USER_ATTRIBUTE - See Also:
- Constant Field Values
 
 - 
EMAILpublic static final String EMAIL - See Also:
- Constant Field Values
 
 - 
FIRST_NAMEpublic static final String FIRST_NAME - See Also:
- Constant Field Values
 
 - 
LAST_NAMEpublic static final String LAST_NAME - See Also:
- Constant Field Values
 
 - 
PROVIDER_IDpublic static final String PROVIDER_ID - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
supportsSyncModepublic boolean supportsSyncMode(IdentityProviderSyncMode syncMode) 
 - 
getConfigPropertiespublic List<ProviderConfigProperty> getConfigProperties() 
 - 
getIdpublic String getId() 
 - 
getCompatibleProviderspublic String[] getCompatibleProviders() 
 - 
getDisplayCategorypublic String getDisplayCategory() 
 - 
getDisplayTypepublic String getDisplayType() 
 - 
preprocessFederatedIdentitypublic void preprocessFederatedIdentity(KeycloakSession session, RealmModel realm, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) Description copied from interface:IdentityProviderMapperCalled 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:
- preprocessFederatedIdentityin interface- IdentityProviderMapper
- Overrides:
- preprocessFederatedIdentityin class- AbstractIdentityProviderMapper
 
 - 
updateBrokeredUserpublic void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) Description copied from interface:IdentityProviderMapperCalled when this user has logged in before and has already been imported.- Specified by:
- updateBrokeredUserin interface- IdentityProviderMapper
- Overrides:
- updateBrokeredUserin class- AbstractIdentityProviderMapper
 
 - 
getHelpTextpublic String getHelpText() 
 
- 
 
-