Class AbstractOIDCProtocolMapper
java.lang.Object
org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper
- All Implemented Interfaces:
ProtocolMapper,ConfiguredProvider,Provider,ProviderFactory<ProtocolMapper>
- Direct Known Subclasses:
AbstractPairwiseSubMapper,AbstractUserRoleMappingMapper,AcrProtocolMapper,AddressMapper,AllowedWebOriginsProtocolMapper,AmrProtocolMapper,AudienceProtocolMapper,AudienceResolveProtocolMapper,ClaimsParameterTokenMapper,ClaimsParameterWithValueIdTokenMapper,FullNameMapper,GroupMembershipMapper,HardcodedClaim,HardcodedRole,OrganizationMembershipMapper,RoleNameMapper,ScriptBasedOIDCProtocolMapper,SessionStateMapper,SubMapper,UserAttributeMapper,UserPropertyMapper,UserSessionNoteMapper
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()This is called when the server shuts down.final ProtocolMappercreate(KeycloakSession session) getEffectiveModel(KeycloakSession session, RealmModel realm, ProtocolMapperModel protocolMapperModel) Get effective configuration of protocol mapper.static booleanvoidinit(Config.Scope config) Only called once when the factory is first created.voidpostInit(KeycloakSessionFactory factory) Called after all provider factories have been initializedprotected voidsetClaim(AccessTokenResponse accessTokenResponse, ProtocolMapperModel mappingModel, UserSessionModel userSession, KeycloakSession keycloakSession, ClientSessionContext clientSessionCtx) Intended to be overridden inProtocolMapperimplementations to add claims to an token.protected voidsetClaim(IDToken token, ProtocolMapperModel mappingModel, UserSessionModel userSession) Deprecated.protected voidsetClaim(IDToken token, ProtocolMapperModel mappingModel, UserSessionModel userSession, KeycloakSession keycloakSession, ClientSessionContext clientSessionCtx) Intended to be overridden inProtocolMapperimplementations to add claims to an token.transformAccessToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) transformAccessTokenResponse(AccessTokenResponse accessTokenResponse, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) transformIDToken(IDToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) transformIntrospectionToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) transformUserInfoToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.provider.ConfiguredProvider
getConfig, getConfigProperties, getHelpTextMethods inherited from interface org.keycloak.protocol.ProtocolMapper
getDisplayCategory, getDisplayType, getPriority, validateConfigMethods inherited from interface org.keycloak.provider.ProviderFactory
dependsOn, getConfigMetadata, getId, order
-
Field Details
-
TOKEN_MAPPER_CATEGORY
- See Also:
-
-
Constructor Details
-
AbstractOIDCProtocolMapper
public AbstractOIDCProtocolMapper()
-
-
Method Details
-
getProtocol
- Specified by:
getProtocolin interfaceProtocolMapper
-
close
public void close()Description copied from interface:ProviderFactoryThis is called when the server shuts down.- Specified by:
closein interfaceProvider- Specified by:
closein interfaceProviderFactory<ProtocolMapper>
-
create
- Specified by:
createin interfaceProviderFactory<ProtocolMapper>
-
init
Description copied from interface:ProviderFactoryOnly called once when the factory is first created.- Specified by:
initin interfaceProviderFactory<ProtocolMapper>
-
postInit
Description copied from interface:ProviderFactoryCalled after all provider factories have been initialized- Specified by:
postInitin interfaceProviderFactory<ProtocolMapper>
-
transformUserInfoToken
public AccessToken transformUserInfoToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) -
getShouldUseLightweightToken
-
transformAccessToken
public AccessToken transformAccessToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) -
transformIDToken
public IDToken transformIDToken(IDToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) -
transformAccessTokenResponse
public AccessTokenResponse transformAccessTokenResponse(AccessTokenResponse accessTokenResponse, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) -
transformIntrospectionToken
public AccessToken transformIntrospectionToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) -
setClaim
@Deprecated protected void setClaim(IDToken token, ProtocolMapperModel mappingModel, UserSessionModel userSession) Deprecated.Intended to be overridden inProtocolMapperimplementations to add claims to an token.- Parameters:
token-mappingModel-userSession-
-
setClaim
protected void setClaim(IDToken token, ProtocolMapperModel mappingModel, UserSessionModel userSession, KeycloakSession keycloakSession, ClientSessionContext clientSessionCtx) Intended to be overridden inProtocolMapperimplementations to add claims to an token.- Parameters:
token-mappingModel-userSession-keycloakSession-clientSessionCtx-
-
setClaim
protected void setClaim(AccessTokenResponse accessTokenResponse, ProtocolMapperModel mappingModel, UserSessionModel userSession, KeycloakSession keycloakSession, ClientSessionContext clientSessionCtx) Intended to be overridden inProtocolMapperimplementations to add claims to an token.- Parameters:
accessTokenResponse-mappingModel-userSession-keycloakSession-clientSessionCtx-
-
getEffectiveModel
public ProtocolMapperModel getEffectiveModel(KeycloakSession session, RealmModel realm, ProtocolMapperModel protocolMapperModel) Description copied from interface:ProtocolMapperGet effective configuration of protocol mapper. Effective configuration takes "default values" of the options into consideration and hence it is the configuration, which would be actually used when processing this protocolMapper during issuing tokens/assertions. So for instance, when configuration option "introspection.token.claim" is unset in the protocolMapperModel, but default value of this option is supposed to be "true", then effective config returned by this method will contain "introspection.token.claim" config option with value "true" . If the "introspection.token.claim" is set, then the default value is typically ignored in the effective configuration, but this can depend on the implementation of particular protocol mapper.- Specified by:
getEffectiveModelin interfaceProtocolMapper
-
setClaim(IDToken, ProtocolMapperModel, UserSessionModel, KeycloakSession, ClientSessionContext)instead.