public abstract class AbstractOIDCProtocolMapper extends Object implements ProtocolMapper
| Modifier and Type | Field and Description |
|---|---|
static String |
TOKEN_MAPPER_CATEGORY |
| Constructor and Description |
|---|
AbstractOIDCProtocolMapper() |
| Modifier and Type | Method and 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 initialized
|
protected void |
setClaim(AccessTokenResponse accessTokenResponse,
ProtocolMapperModel mappingModel,
UserSessionModel userSession,
KeycloakSession keycloakSession,
ClientSessionContext clientSessionCtx)
Intended to be overridden in
ProtocolMapper 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 in
ProtocolMapper 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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDisplayCategory, getDisplayType, getPriority, validateConfiggetId, ordergetConfigProperties, getHelpTextpublic static final String TOKEN_MAPPER_CATEGORY
public String getProtocol()
getProtocol in interface ProtocolMapperpublic void close()
ProviderFactoryclose in interface Providerclose in interface ProviderFactory<ProtocolMapper>public final ProtocolMapper create(KeycloakSession session)
create in interface ProviderFactory<ProtocolMapper>public void init(Config.Scope config)
ProviderFactoryinit in interface ProviderFactory<ProtocolMapper>public void postInit(KeycloakSessionFactory factory)
ProviderFactorypostInit in interface ProviderFactory<ProtocolMapper>public AccessToken transformUserInfoToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx)
public AccessToken transformAccessToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx)
public IDToken transformIDToken(IDToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx)
public AccessTokenResponse transformAccessTokenResponse(AccessTokenResponse accessTokenResponse, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx)
@Deprecated protected void setClaim(IDToken token, ProtocolMapperModel mappingModel, UserSessionModel userSession)
setClaim(IDToken, ProtocolMapperModel, UserSessionModel, KeycloakSession, ClientSessionContext) instead.ProtocolMapper implementations to add claims to an token.token - mappingModel - userSession - protected void setClaim(IDToken token, ProtocolMapperModel mappingModel, UserSessionModel userSession, KeycloakSession keycloakSession, ClientSessionContext clientSessionCtx)
ProtocolMapper implementations to add claims to an token.token - mappingModel - userSession - keycloakSession - clientSessionCtx - protected void setClaim(AccessTokenResponse accessTokenResponse, ProtocolMapperModel mappingModel, UserSessionModel userSession, KeycloakSession keycloakSession, ClientSessionContext clientSessionCtx)
ProtocolMapper implementations to add claims to an token.accessTokenResponse - mappingModel - userSession - keycloakSession - clientSessionCtx - Copyright © 2021 JBoss by Red Hat. All rights reserved.