Class AmrProtocolMapper
java.lang.Object
org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper
org.keycloak.protocol.oidc.mappers.AmrProtocolMapper
- All Implemented Interfaces:
OIDCAccessTokenMapper,OIDCIDTokenMapper,ProtocolMapper,ConfiguredProvider,Provider,ProviderFactory<ProtocolMapper>
public class AmrProtocolMapper
extends AbstractOIDCProtocolMapper
implements OIDCAccessTokenMapper, OIDCIDTokenMapper
- Author:
- Ben Cresitello-Dittmar This protocol mapper sets the 'amr' claim on the OIDC tokens to the reference values configured on the completed authenticators found in the user session notes.
-
Field Summary
FieldsFields inherited from class org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper
TOKEN_MAPPER_CATEGORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProtocolMapperModelgetAmr(AuthenticatedClientSessionModel clientSession, RealmModel realmModel) Extract the AMR values from the existing session.getId()protected voidsetClaim(IDToken token, ProtocolMapperModel mappingModel, UserSessionModel userSession, KeycloakSession keycloakSession, ClientSessionContext clientSessionCtx) Intended to be overridden inProtocolMapperimplementations to add claims to an token.Methods inherited from class org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper
close, create, getEffectiveModel, getProtocol, getShouldUseLightweightToken, init, postInit, setClaim, setClaim, transformAccessToken, transformAccessTokenResponse, transformIDToken, transformIntrospectionToken, transformUserInfoTokenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.provider.ConfiguredProvider
getConfigMethods inherited from interface org.keycloak.protocol.oidc.mappers.OIDCAccessTokenMapper
transformAccessTokenMethods inherited from interface org.keycloak.protocol.oidc.mappers.OIDCIDTokenMapper
transformIDTokenMethods inherited from interface org.keycloak.protocol.ProtocolMapper
getPriority, validateConfigMethods inherited from interface org.keycloak.provider.ProviderFactory
dependsOn, getConfigMetadata, order
-
Field Details
-
PROVIDER_ID
- See Also:
-
-
Constructor Details
-
AmrProtocolMapper
public AmrProtocolMapper()
-
-
Method Details
-
getConfigProperties
- Specified by:
getConfigPropertiesin interfaceConfiguredProvider
-
getId
- Specified by:
getIdin interfaceProviderFactory<ProtocolMapper>
-
getDisplayType
- Specified by:
getDisplayTypein interfaceProtocolMapper
-
getDisplayCategory
- Specified by:
getDisplayCategoryin interfaceProtocolMapper
-
getHelpText
- Specified by:
getHelpTextin interfaceConfiguredProvider
-
setClaim
protected void setClaim(IDToken token, ProtocolMapperModel mappingModel, UserSessionModel userSession, KeycloakSession keycloakSession, ClientSessionContext clientSessionCtx) Description copied from class:AbstractOIDCProtocolMapperIntended to be overridden inProtocolMapperimplementations to add claims to an token.- Overrides:
setClaimin classAbstractOIDCProtocolMapper
-
create
-
getAmr
Extract the AMR values from the existing session.- Parameters:
clientSession- The existing authenticated sessionrealmModel- The realm the mapper is executed in. Used to get the execution configuration.- Returns:
- The authenticator reference values associated with the completed executions
-