public abstract class AbstractClaimToRoleMapper extends AbstractClaimMapper
Keycloak
role.CLAIM, CLAIM_VALUE
ANY_PROVIDER, DEFAULT_IDENTITY_PROVIDER_MAPPER_SYNC_MODES
Constructor and Description |
---|
AbstractClaimToRoleMapper() |
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) |
void |
updateBrokeredUser(KeycloakSession session,
RealmModel realm,
UserModel user,
IdentityProviderMapperModel mapperModel,
BrokeredIdentityContext context) |
void |
updateBrokeredUserLegacy(KeycloakSession session,
RealmModel realm,
UserModel user,
IdentityProviderMapperModel mapperModel,
BrokeredIdentityContext context) |
getClaimValue, getClaimValue, getClaimValue, hasClaimValue, valueEquals
close, create, init, postInit, preprocessFederatedIdentity
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)
importNewUser
in interface IdentityProviderMapper
importNewUser
in class AbstractIdentityProviderMapper
public void updateBrokeredUserLegacy(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)
updateBrokeredUserLegacy
in interface IdentityProviderMapper
updateBrokeredUserLegacy
in class AbstractIdentityProviderMapper
public void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context)
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 OIDC claim 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.