Class AbstractOIDCProtocolMapper
- java.lang.Object
-
- org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper
-
- All Implemented Interfaces:
ProtocolMapper
,ConfiguredProvider
,Provider
,ProviderFactory<ProtocolMapper>
- Direct Known Subclasses:
AbstractPairwiseSubMapper
,AcrProtocolMapper
,AddressMapper
,AllowedWebOriginsProtocolMapper
,AudienceProtocolMapper
,AudienceResolveProtocolMapper
,ClaimsParameterTokenMapper
,ClaimsParameterWithValueIdTokenMapper
,FullNameMapper
,GroupMembershipMapper
,HardcodedClaim
,HardcodedRole
,RoleNameMapper
,ScriptBasedOIDCProtocolMapper
,UserAttributeMapper
,UserClientRoleMappingMapper
,UserPropertyMapper
,UserRealmRoleMappingMapper
,UserSessionNoteMapper
public abstract class AbstractOIDCProtocolMapper extends Object implements ProtocolMapper
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description static String
TOKEN_MAPPER_CATEGORY
-
Constructor Summary
Constructors Constructor Description AbstractOIDCProtocolMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
This is called when the server shuts down.ProtocolMapper
create(KeycloakSession session)
String
getProtocol()
void
init(Config.Scope config)
Only called once when the factory is first created.void
postInit(KeycloakSessionFactory factory)
Called after all provider factories have been initializedprotected void
setClaim(AccessTokenResponse accessTokenResponse, ProtocolMapperModel mappingModel, UserSessionModel userSession, KeycloakSession keycloakSession, ClientSessionContext clientSessionCtx)
Intended to be overridden inProtocolMapper
implementations to add claims to an token.protected void
setClaim(IDToken token, ProtocolMapperModel mappingModel, UserSessionModel userSession)
Deprecated.protected void
setClaim(IDToken token, ProtocolMapperModel mappingModel, UserSessionModel userSession, KeycloakSession keycloakSession, ClientSessionContext clientSessionCtx)
Intended to be overridden inProtocolMapper
implementations to add claims to an token.AccessToken
transformAccessToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx)
AccessTokenResponse
transformAccessTokenResponse(AccessTokenResponse accessTokenResponse, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx)
IDToken
transformIDToken(IDToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx)
AccessToken
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, wait
-
Methods inherited from interface org.keycloak.provider.ConfiguredProvider
getConfig, getConfigProperties, getHelpText
-
Methods inherited from interface org.keycloak.protocol.ProtocolMapper
getDisplayCategory, getDisplayType, getPriority, validateConfig
-
Methods inherited from interface org.keycloak.provider.ProviderFactory
getConfigMetadata, getId, order
-
-
-
-
Field Detail
-
TOKEN_MAPPER_CATEGORY
public static final String TOKEN_MAPPER_CATEGORY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProtocol
public String getProtocol()
- Specified by:
getProtocol
in interfaceProtocolMapper
-
close
public void close()
Description copied from interface:ProviderFactory
This is called when the server shuts down.- Specified by:
close
in interfaceProvider
- Specified by:
close
in interfaceProviderFactory<ProtocolMapper>
-
create
public final ProtocolMapper create(KeycloakSession session)
- Specified by:
create
in interfaceProviderFactory<ProtocolMapper>
-
init
public void init(Config.Scope config)
Description copied from interface:ProviderFactory
Only called once when the factory is first created. This config is pulled from keycloak_server.json- Specified by:
init
in interfaceProviderFactory<ProtocolMapper>
-
postInit
public void postInit(KeycloakSessionFactory factory)
Description copied from interface:ProviderFactory
Called after all provider factories have been initialized- Specified by:
postInit
in interfaceProviderFactory<ProtocolMapper>
-
transformUserInfoToken
public AccessToken transformUserInfoToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx)
-
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)
-
setClaim
@Deprecated protected void setClaim(IDToken token, ProtocolMapperModel mappingModel, UserSessionModel userSession)
Deprecated.Intended to be overridden inProtocolMapper
implementations 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 inProtocolMapper
implementations 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 inProtocolMapper
implementations to add claims to an token.- Parameters:
accessTokenResponse
-mappingModel
-userSession
-keycloakSession
-clientSessionCtx
-
-
-