Class OIDCAttributeMapperHelper

java.lang.Object
org.keycloak.protocol.oidc.mappers.OIDCAttributeMapperHelper

public class OIDCAttributeMapperHelper extends Object
Version:
$Revision: 1 $
Author:
Bill Burke
  • Field Details

  • Constructor Details

    • OIDCAttributeMapperHelper

      public OIDCAttributeMapperHelper()
  • Method Details

    • mapAttributeValue

      public static Object mapAttributeValue(org.keycloak.models.ProtocolMapperModel mappingModel, Object attributeValue)
    • 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 token
      effectiveModel - 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

      public static org.keycloak.models.ProtocolMapperModel createClaimMapper(String name, String userAttribute, String tokenClaimName, String claimType, boolean accessToken, boolean idToken, boolean introspectionEndpoint, String mapperId)
    • createClaimMapper

      public static org.keycloak.models.ProtocolMapperModel createClaimMapper(String name, String userAttribute, String tokenClaimName, String claimType, boolean accessToken, boolean idToken, boolean userinfo, boolean introspectionEndpoint, String mapperId)
    • 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

      public static void addAttributeConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties, Class<? extends org.keycloak.protocol.ProtocolMapper> protocolMapperClass)
    • addTokenClaimNameConfig

      public static void addTokenClaimNameConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties)
    • addJsonTypeConfig

      public static void addJsonTypeConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties)
    • addJsonTypeConfig

      public static void addJsonTypeConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties, List<String> supportedTypes, String defaultValue)
    • addIncludeInTokensConfig

      public static void addIncludeInTokensConfig(List<org.keycloak.provider.ProviderConfigProperty> configProperties, Class<? extends org.keycloak.protocol.ProtocolMapper> protocolMapperClass)