Class AllowedWebOriginsProtocolMapper
java.lang.Object
org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper
org.keycloak.protocol.oidc.mappers.AllowedWebOriginsProtocolMapper
- All Implemented Interfaces:
OIDCAccessTokenMapper,TokenIntrospectionTokenMapper,ProtocolMapper,ConfiguredProvider,Provider,ProviderFactory<ProtocolMapper>
public class AllowedWebOriginsProtocolMapper
extends AbstractOIDCProtocolMapper
implements OIDCAccessTokenMapper, TokenIntrospectionTokenMapper
Protocol mapper to add allowed web origins to the access token to the 'allowed-origins' claim
- Author:
- Marek Posolda
-
Field Summary
FieldsFields inherited from class org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper
TOKEN_MAPPER_CATEGORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProtocolMapperModelcreateClaimMapper(String name, boolean accessToken, boolean introspectionEndpoint) getEffectiveModel(KeycloakSession session, RealmModel realm, ProtocolMapperModel protocolMapperModel) Get effective configuration of protocol mapper.getId()transformAccessToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) transformIntrospectionToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) Methods inherited from class org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper
close, create, getProtocol, getShouldUseLightweightToken, init, postInit, setClaim, setClaim, setClaim, transformAccessTokenResponse, transformIDToken, 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.ProtocolMapper
getPriority, validateConfigMethods inherited from interface org.keycloak.provider.ProviderFactory
dependsOn, getConfigMetadata, order
-
Field Details
-
PROVIDER_ID
- See Also:
-
-
Constructor Details
-
AllowedWebOriginsProtocolMapper
public AllowedWebOriginsProtocolMapper()
-
-
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
-
transformAccessToken
public AccessToken transformAccessToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) - Specified by:
transformAccessTokenin interfaceOIDCAccessTokenMapper- Overrides:
transformAccessTokenin classAbstractOIDCProtocolMapper
-
transformIntrospectionToken
public AccessToken transformIntrospectionToken(AccessToken token, ProtocolMapperModel mappingModel, KeycloakSession session, UserSessionModel userSession, ClientSessionContext clientSessionCtx) - Specified by:
transformIntrospectionTokenin interfaceTokenIntrospectionTokenMapper- Overrides:
transformIntrospectionTokenin classAbstractOIDCProtocolMapper
-
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- Overrides:
getEffectiveModelin classAbstractOIDCProtocolMapper
-
createClaimMapper
public static ProtocolMapperModel createClaimMapper(String name, boolean accessToken, boolean introspectionEndpoint)
-