Class OIDCAttributeMapperHelper
java.lang.Object
org.keycloak.protocol.oidc.mappers.OIDCAttributeMapperHelper
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAttributeConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties, Class<? extends org.keycloak.protocol.ProtocolMapper> protocolMapperClass) static voidaddIncludeInTokensConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties, Class<? extends org.keycloak.protocol.ProtocolMapper> protocolMapperClass) static voidaddJsonTypeConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties) static voidaddJsonTypeConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties, List<String> supportedTypes, String defaultValue) static voidaddTokenClaimNameConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties) static org.keycloak.models.ProtocolMapperModelcreateClaimMapper(String name, String userAttribute, String tokenClaimName, String claimType, boolean accessToken, boolean idToken, boolean userinfo, boolean introspectionEndpoint, String mapperId) static org.keycloak.models.ProtocolMapperModelcreateClaimMapper(String name, String userAttribute, String tokenClaimName, String claimType, boolean accessToken, boolean idToken, boolean introspectionEndpoint, String mapperId) getOrInitializeOrganizationClaimAsMap(org.keycloak.representations.IDToken token, org.keycloak.models.ProtocolMapperModel effectiveModel) Get or initialize the organization claim as a mutable Map for composition between organization mappers.static booleanincludeInAccessToken(org.keycloak.models.ProtocolMapperModel mappingModel) static booleanincludeInAccessTokenResponse(org.keycloak.models.ProtocolMapperModel mappingModel) static booleanincludeInIDToken(org.keycloak.models.ProtocolMapperModel mappingModel) static booleanincludeInIntrospection(org.keycloak.models.ProtocolMapperModel mappingModel) static booleanincludeInLightweightAccessToken(org.keycloak.models.ProtocolMapperModel mappingModel) static booleanincludeInUserInfo(org.keycloak.models.ProtocolMapperModel mappingModel) static booleanisMultivalued(org.keycloak.models.ProtocolMapperModel mappingModel) static ObjectmapAttributeValue(org.keycloak.models.ProtocolMapperModel mappingModel, Object attributeValue) static voidmapClaim(org.keycloak.representations.AccessTokenResponse token, org.keycloak.models.ProtocolMapperModel mappingModel, Object attributeValue) static voidmapClaim(org.keycloak.representations.IDToken token, org.keycloak.models.ProtocolMapperModel mappingModel, Object attributeValue)
-
Field Details
-
TOKEN_CLAIM_NAME
- See Also:
-
TOKEN_CLAIM_NAME_LABEL
- See Also:
-
TOKEN_CLAIM_NAME_TOOLTIP
- See Also:
-
JSON_TYPE
- See Also:
-
JSON_TYPE_TOOLTIP
- See Also:
-
INCLUDE_IN_ACCESS_TOKEN
- See Also:
-
INCLUDE_IN_ACCESS_TOKEN_LABEL
- See Also:
-
INCLUDE_IN_ACCESS_TOKEN_HELP_TEXT
- See Also:
-
INCLUDE_IN_ID_TOKEN
- See Also:
-
INCLUDE_IN_ID_TOKEN_LABEL
- See Also:
-
INCLUDE_IN_ID_TOKEN_HELP_TEXT
- See Also:
-
INCLUDE_IN_ACCESS_TOKEN_RESPONSE
- See Also:
-
INCLUDE_IN_ACCESS_TOKEN_RESPONSE_LABEL
- See Also:
-
INCLUDE_IN_ACCESS_TOKEN_RESPONSE_HELP_TEXT
- See Also:
-
INCLUDE_IN_USERINFO
- See Also:
-
INCLUDE_IN_USERINFO_LABEL
- See Also:
-
INCLUDE_IN_USERINFO_HELP_TEXT
- See Also:
-
INCLUDE_IN_INTROSPECTION
- See Also:
-
INCLUDE_IN_INTROSPECTION_LABEL
- See Also:
-
INCLUDE_IN_INTROSPECTION_HELP_TEXT
- See Also:
-
INCLUDE_IN_LIGHTWEIGHT_ACCESS_TOKEN
- See Also:
-
INCLUDE_IN_LIGHTWEIGHT_ACCESS_TOKEN_LABEL
- See Also:
-
INCLUDE_IN_LIGHTWEIGHT_ACCESS_TOKEN_HELP_TEXT
- See Also:
-
-
Constructor Details
-
OIDCAttributeMapperHelper
public OIDCAttributeMapperHelper()
-
-
Method Details
-
mapAttributeValue
-
getOrInitializeOrganizationClaimAsMap
public static Map<String,Object> getOrInitializeOrganizationClaimAsMap(org.keycloak.representations.IDToken token, org.keycloak.models.ProtocolMapperModel effectiveModel) Get or initialize the organization claim as a mutable Map for composition between organization mappers. Handles conversion from OrganizationMembershipMapper output to Map structure that OrganizationGroupMembershipMapper can add to. Supports ObjectNode (JSON type), Collection or String (String type), existing Map, or creates empty Map if null.- Parameters:
token- the tokeneffectiveModel- the effective model of the protocol mapper to retrieve the name of the organization claim- Returns:
- a mutable Map that can be manipulated; changes will be reflected in the token
-
mapClaim
public static void mapClaim(org.keycloak.representations.IDToken token, org.keycloak.models.ProtocolMapperModel mappingModel, Object attributeValue) -
mapClaim
public static void mapClaim(org.keycloak.representations.AccessTokenResponse token, org.keycloak.models.ProtocolMapperModel mappingModel, Object attributeValue) -
createClaimMapper
-
createClaimMapper
-
includeInIDToken
public static boolean includeInIDToken(org.keycloak.models.ProtocolMapperModel mappingModel) -
includeInAccessToken
public static boolean includeInAccessToken(org.keycloak.models.ProtocolMapperModel mappingModel) -
includeInAccessTokenResponse
public static boolean includeInAccessTokenResponse(org.keycloak.models.ProtocolMapperModel mappingModel) -
isMultivalued
public static boolean isMultivalued(org.keycloak.models.ProtocolMapperModel mappingModel) -
includeInUserInfo
public static boolean includeInUserInfo(org.keycloak.models.ProtocolMapperModel mappingModel) -
includeInIntrospection
public static boolean includeInIntrospection(org.keycloak.models.ProtocolMapperModel mappingModel) -
includeInLightweightAccessToken
public static boolean includeInLightweightAccessToken(org.keycloak.models.ProtocolMapperModel mappingModel) -
addAttributeConfig
-
addTokenClaimNameConfig
public static void addTokenClaimNameConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties) -
addJsonTypeConfig
public static void addJsonTypeConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties) -
addJsonTypeConfig
-
addIncludeInTokensConfig
-