public abstract class AbstractAttributeToRoleMapper extends AbstractIdentityProviderMapper
Keycloak
role.ANY_PROVIDER, DEFAULT_IDENTITY_PROVIDER_MAPPER_SYNC_MODES
Constructor and Description |
---|
AbstractAttributeToRoleMapper() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
applies(IdentityProviderMapperModel mapperModel,
BrokeredIdentityContext context)
This method must be implemented by subclasses and they must return
true if their mapping can be applied
(i.e. |
void |
importNewUser(KeycloakSession session,
RealmModel realm,
UserModel user,
IdentityProviderMapperModel mapperModel,
BrokeredIdentityContext context)
Called after UserModel is created for first time for this user.
|
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.
|
close, create, init, postInit, preprocessFederatedIdentity, updateBrokeredUserLegacy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCompatibleProviders, getDisplayCategory, getDisplayType, supportsSyncMode
getId, order
getConfigProperties, getHelpText
public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)
IdentityProviderMapper
importNewUser
in interface IdentityProviderMapper
importNewUser
in class AbstractIdentityProviderMapper
public void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)
IdentityProviderMapper
updateBrokeredUser
in interface IdentityProviderMapper
updateBrokeredUser
in class AbstractIdentityProviderMapper
protected abstract boolean applies(IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)
true
if their mapping can be applied
(i.e. user has the SAML attribute that should be mapped) or false
otherwise.mapperModel
- a reference to the IdentityProviderMapperModel
.context
- a reference to the BrokeredIdentityContext
.true
if the mapping can be applied or false
otherwise.Copyright © 2021 JBoss by Red Hat. All rights reserved.