Class SHA256PairwiseSubMapper
java.lang.Object
org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper
org.keycloak.protocol.oidc.mappers.AbstractPairwiseSubMapper
org.keycloak.protocol.oidc.mappers.SHA256PairwiseSubMapper
- All Implemented Interfaces:
OIDCAccessTokenMapper
,OIDCIDTokenMapper
,UserInfoTokenMapper
,ProtocolMapper
,ConfiguredProvider
,Provider
,ProviderFactory<ProtocolMapper>
-
Field Summary
Fields inherited from class org.keycloak.protocol.oidc.mappers.AbstractPairwiseSubMapper
PROVIDER_ID_SUFFIX
Fields inherited from class org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper
TOKEN_MAPPER_CATEGORY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProtocolMapperRepresentation
createPairwiseMapper
(String sectorIdentifierUri, String salt) generateSub
(ProtocolMapperModel mappingModel, String sectorIdentifier, String localSub) Generates a pairwise subject identifier.Override to add additional provider configuration properties.void
validateAdditionalConfig
(KeycloakSession session, RealmModel realm, ProtocolMapperContainerModel mapperContainer, ProtocolMapperModel mapperModel) Override to add additional configuration validation.Methods inherited from class org.keycloak.protocol.oidc.mappers.AbstractPairwiseSubMapper
getConfigProperties, getDisplayCategory, getId, setAccessTokenSubject, setIDTokenSubject, setUserInfoTokenSubject, transformAccessToken, transformIDToken, transformUserInfoToken, validateConfig
Methods inherited from class org.keycloak.protocol.oidc.mappers.AbstractOIDCProtocolMapper
close, create, getProtocol, init, postInit, setClaim, setClaim, setClaim, transformAccessTokenResponse
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
getPriority
Methods inherited from interface org.keycloak.provider.ProviderFactory
getConfigMetadata, order
-
Field Details
-
PROVIDER_ID
- See Also:
-
-
Constructor Details
-
SHA256PairwiseSubMapper
public SHA256PairwiseSubMapper()
-
-
Method Details
-
createPairwiseMapper
public static ProtocolMapperRepresentation createPairwiseMapper(String sectorIdentifierUri, String salt) -
validateAdditionalConfig
public void validateAdditionalConfig(KeycloakSession session, RealmModel realm, ProtocolMapperContainerModel mapperContainer, ProtocolMapperModel mapperModel) throws ProtocolMapperConfigException Description copied from class:AbstractPairwiseSubMapper
Override to add additional configuration validation. Called when instance of mapperModel is created/updated for this protocolMapper through admin endpoint.- Overrides:
validateAdditionalConfig
in classAbstractPairwiseSubMapper
mapperContainer
- client or clientScope- Throws:
ProtocolMapperConfigException
- if configuration provided in mapperModel is not valid
-
getHelpText
-
getAdditionalConfigProperties
Description copied from class:AbstractPairwiseSubMapper
Override to add additional provider configuration properties. By default, a pairwise sub mapper will only contain configuration for a sector identifier URI.- Overrides:
getAdditionalConfigProperties
in classAbstractPairwiseSubMapper
- Returns:
- A list of provider configuration properties.
-
generateSub
public String generateSub(ProtocolMapperModel mappingModel, String sectorIdentifier, String localSub) Description copied from class:AbstractPairwiseSubMapper
Generates a pairwise subject identifier.- Specified by:
generateSub
in classAbstractPairwiseSubMapper
sectorIdentifier
- client sector identifierlocalSub
- local subject identifier (user id)- Returns:
- A pairwise subject identifier
-
getDisplayType
-
getIdPrefix
- Specified by:
getIdPrefix
in classAbstractPairwiseSubMapper
-