Class OID4VCUserAttributeMapper

java.lang.Object
org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCMapper
org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCUserAttributeMapper
All Implemented Interfaces:
OID4VCEnvironmentProviderFactory, org.keycloak.protocol.ProtocolMapper, org.keycloak.provider.ConfiguredProvider, org.keycloak.provider.EnvironmentDependentProviderFactory, org.keycloak.provider.Provider, org.keycloak.provider.ProviderFactory<org.keycloak.protocol.ProtocolMapper>

public class OID4VCUserAttributeMapper extends OID4VCMapper
Allows adding user properties to the credential subject
Author:
Stefan Wiedemann
  • Field Details

  • Constructor Details

    • OID4VCUserAttributeMapper

      public OID4VCUserAttributeMapper()
  • Method Details

    • getIndividualConfigProperties

      protected List<org.keycloak.provider.ProviderConfigProperty> getIndividualConfigProperties()
      Specified by:
      getIndividualConfigProperties in class OID4VCMapper
    • setClaim

      public void setClaim(VerifiableCredential verifiableCredential, org.keycloak.models.UserSessionModel userSessionModel)
      Description copied from class: OID4VCMapper
      Set the claims to credential, like f.e. the context
      Specified by:
      setClaim in class OID4VCMapper
    • setClaim

      public void setClaim(Map<String,Object> claims, org.keycloak.models.UserSessionModel userSessionModel)
      Description copied from class: OID4VCMapper
      Set the claims to the credential subject.
      Specified by:
      setClaim in class OID4VCMapper
    • create

      public static org.keycloak.models.ProtocolMapperModel create(String mapperName, String claimName, String userAttribute, boolean aggregateAttributes)
    • getDisplayType

      public String getDisplayType()
    • getHelpText

      public String getHelpText()
    • create

      public org.keycloak.protocol.ProtocolMapper create(org.keycloak.models.KeycloakSession session)
    • getId

      public String getId()
    • getMetadataAttributePath

      public List<String> getMetadataAttributePath()
      Description copied from class: OID4VCMapper
      must return ordered list of attribute-names as they are added into the credential. This is required for the metadata endpoint to add the appropriate path-attributes into the claim's description.
      Overrides:
      getMetadataAttributePath in class OID4VCMapper
      Returns:
      the attribute path that is being mapped into the credential