Class OIDCAttributeMapperHelper
- java.lang.Object
-
- org.keycloak.protocol.oidc.mappers.OIDCAttributeMapperHelper
-
public class OIDCAttributeMapperHelper extends Object
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description static StringINCLUDE_IN_ACCESS_TOKENstatic StringINCLUDE_IN_ACCESS_TOKEN_HELP_TEXTstatic StringINCLUDE_IN_ACCESS_TOKEN_LABELstatic StringINCLUDE_IN_ACCESS_TOKEN_RESPONSEstatic StringINCLUDE_IN_ACCESS_TOKEN_RESPONSE_HELP_TEXTstatic StringINCLUDE_IN_ACCESS_TOKEN_RESPONSE_LABELstatic StringINCLUDE_IN_ID_TOKENstatic StringINCLUDE_IN_ID_TOKEN_HELP_TEXTstatic StringINCLUDE_IN_ID_TOKEN_LABELstatic StringINCLUDE_IN_USERINFOstatic StringINCLUDE_IN_USERINFO_HELP_TEXTstatic StringINCLUDE_IN_USERINFO_LABELstatic StringJSON_TYPEstatic StringJSON_TYPE_TOOLTIPstatic StringTOKEN_CLAIM_NAMEstatic StringTOKEN_CLAIM_NAME_LABELstatic StringTOKEN_CLAIM_NAME_TOOLTIP
-
Constructor Summary
Constructors Constructor Description OIDCAttributeMapperHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddAttributeConfig(List<ProviderConfigProperty> configProperties, Class<? extends ProtocolMapper> protocolMapperClass)static voidaddIncludeInTokensConfig(List<ProviderConfigProperty> configProperties, Class<? extends ProtocolMapper> protocolMapperClass)static voidaddJsonTypeConfig(List<ProviderConfigProperty> configProperties)static voidaddTokenClaimNameConfig(List<ProviderConfigProperty> configProperties)static ProtocolMapperModelcreateClaimMapper(String name, String userAttribute, String tokenClaimName, String claimType, boolean accessToken, boolean idToken, boolean userinfo, String mapperId)static ProtocolMapperModelcreateClaimMapper(String name, String userAttribute, String tokenClaimName, String claimType, boolean accessToken, boolean idToken, String mapperId)static booleanincludeInAccessToken(ProtocolMapperModel mappingModel)static booleanincludeInAccessTokenResponse(ProtocolMapperModel mappingModel)static booleanincludeInIDToken(ProtocolMapperModel mappingModel)static booleanincludeInUserInfo(ProtocolMapperModel mappingModel)static booleanisMultivalued(ProtocolMapperModel mappingModel)static ObjectmapAttributeValue(ProtocolMapperModel mappingModel, Object attributeValue)static voidmapClaim(AccessTokenResponse token, ProtocolMapperModel mappingModel, Object attributeValue)static voidmapClaim(IDToken token, ProtocolMapperModel mappingModel, Object attributeValue)
-
-
-
Field Detail
-
TOKEN_CLAIM_NAME
public static final String TOKEN_CLAIM_NAME
- See Also:
- Constant Field Values
-
TOKEN_CLAIM_NAME_LABEL
public static final String TOKEN_CLAIM_NAME_LABEL
- See Also:
- Constant Field Values
-
TOKEN_CLAIM_NAME_TOOLTIP
public static final String TOKEN_CLAIM_NAME_TOOLTIP
- See Also:
- Constant Field Values
-
JSON_TYPE
public static final String JSON_TYPE
- See Also:
- Constant Field Values
-
JSON_TYPE_TOOLTIP
public static final String JSON_TYPE_TOOLTIP
- See Also:
- Constant Field Values
-
INCLUDE_IN_ACCESS_TOKEN
public static final String INCLUDE_IN_ACCESS_TOKEN
- See Also:
- Constant Field Values
-
INCLUDE_IN_ACCESS_TOKEN_LABEL
public static final String INCLUDE_IN_ACCESS_TOKEN_LABEL
- See Also:
- Constant Field Values
-
INCLUDE_IN_ACCESS_TOKEN_HELP_TEXT
public static final String INCLUDE_IN_ACCESS_TOKEN_HELP_TEXT
- See Also:
- Constant Field Values
-
INCLUDE_IN_ID_TOKEN
public static final String INCLUDE_IN_ID_TOKEN
- See Also:
- Constant Field Values
-
INCLUDE_IN_ID_TOKEN_LABEL
public static final String INCLUDE_IN_ID_TOKEN_LABEL
- See Also:
- Constant Field Values
-
INCLUDE_IN_ID_TOKEN_HELP_TEXT
public static final String INCLUDE_IN_ID_TOKEN_HELP_TEXT
- See Also:
- Constant Field Values
-
INCLUDE_IN_ACCESS_TOKEN_RESPONSE
public static final String INCLUDE_IN_ACCESS_TOKEN_RESPONSE
- See Also:
- Constant Field Values
-
INCLUDE_IN_ACCESS_TOKEN_RESPONSE_LABEL
public static final String INCLUDE_IN_ACCESS_TOKEN_RESPONSE_LABEL
- See Also:
- Constant Field Values
-
INCLUDE_IN_ACCESS_TOKEN_RESPONSE_HELP_TEXT
public static final String INCLUDE_IN_ACCESS_TOKEN_RESPONSE_HELP_TEXT
- See Also:
- Constant Field Values
-
INCLUDE_IN_USERINFO
public static final String INCLUDE_IN_USERINFO
- See Also:
- Constant Field Values
-
INCLUDE_IN_USERINFO_LABEL
public static final String INCLUDE_IN_USERINFO_LABEL
- See Also:
- Constant Field Values
-
INCLUDE_IN_USERINFO_HELP_TEXT
public static final String INCLUDE_IN_USERINFO_HELP_TEXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
mapAttributeValue
public static Object mapAttributeValue(ProtocolMapperModel mappingModel, Object attributeValue)
-
mapClaim
public static void mapClaim(IDToken token, ProtocolMapperModel mappingModel, Object attributeValue)
-
mapClaim
public static void mapClaim(AccessTokenResponse token, ProtocolMapperModel mappingModel, Object attributeValue)
-
createClaimMapper
public static ProtocolMapperModel createClaimMapper(String name, String userAttribute, String tokenClaimName, String claimType, boolean accessToken, boolean idToken, String mapperId)
-
createClaimMapper
public static ProtocolMapperModel createClaimMapper(String name, String userAttribute, String tokenClaimName, String claimType, boolean accessToken, boolean idToken, boolean userinfo, String mapperId)
-
includeInIDToken
public static boolean includeInIDToken(ProtocolMapperModel mappingModel)
-
includeInAccessToken
public static boolean includeInAccessToken(ProtocolMapperModel mappingModel)
-
includeInAccessTokenResponse
public static boolean includeInAccessTokenResponse(ProtocolMapperModel mappingModel)
-
isMultivalued
public static boolean isMultivalued(ProtocolMapperModel mappingModel)
-
includeInUserInfo
public static boolean includeInUserInfo(ProtocolMapperModel mappingModel)
-
addAttributeConfig
public static void addAttributeConfig(List<ProviderConfigProperty> configProperties, Class<? extends ProtocolMapper> protocolMapperClass)
-
addTokenClaimNameConfig
public static void addTokenClaimNameConfig(List<ProviderConfigProperty> configProperties)
-
addJsonTypeConfig
public static void addJsonTypeConfig(List<ProviderConfigProperty> configProperties)
-
addIncludeInTokensConfig
public static void addIncludeInTokensConfig(List<ProviderConfigProperty> configProperties, Class<? extends ProtocolMapper> protocolMapperClass)
-
-