Class NonceBackwardsCompatibleMapper
java.lang.Object
org.keycloak.protocol.oidc.mappers.NonceBackwardsCompatibleMapper
- All Implemented Interfaces:
OIDCAccessTokenMapper
,ProtocolMapper
,ConfiguredProvider
,Provider
,ProviderFactory<ProtocolMapper>
public class NonceBackwardsCompatibleMapper
extends Object
implements OIDCAccessTokenMapper, ProtocolMapper
Simple mapper that adds the nonce claim into the access token as before. Just adding the mapper reverts back to full old behavior in all the tokens (access, refresh and ID).
- Author:
- rmartinc
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
This is called when the server shuts down.static ProtocolMapperModel
final ProtocolMapper
create
(KeycloakSession session) getId()
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 initializedtransformAccessToken
(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
Methods inherited from interface org.keycloak.protocol.ProtocolMapper
getEffectiveModel, getPriority, validateConfig
Methods inherited from interface org.keycloak.provider.ProviderFactory
getConfigMetadata, order
-
Field Details
-
PROVIDER_ID
- See Also:
-
-
Constructor Details
-
NonceBackwardsCompatibleMapper
public NonceBackwardsCompatibleMapper()
-
-
Method Details
-
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
- Specified by:
create
in interfaceProviderFactory<ProtocolMapper>
-
init
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
Description copied from interface:ProviderFactory
Called after all provider factories have been initialized- Specified by:
postInit
in interfaceProviderFactory<ProtocolMapper>
-
getId
- Specified by:
getId
in interfaceProviderFactory<ProtocolMapper>
-
getDisplayType
- Specified by:
getDisplayType
in interfaceProtocolMapper
-
getDisplayCategory
- Specified by:
getDisplayCategory
in interfaceProtocolMapper
-
getHelpText
- Specified by:
getHelpText
in interfaceConfiguredProvider
-
getConfigProperties
- Specified by:
getConfigProperties
in interfaceConfiguredProvider
-
transformAccessToken
public AccessToken transformAccessToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) - Specified by:
transformAccessToken
in interfaceOIDCAccessTokenMapper
-
create
-