Class OID4VCTargetRoleMapper

java.lang.Object
org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCMapper
org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCTargetRoleMapper
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 OID4VCTargetRoleMapper extends OID4VCMapper
Adds the users roles to the credential subject
Author:
Stefan Wiedemann
  • Field Details

  • Constructor Details

    • OID4VCTargetRoleMapper

      public OID4VCTargetRoleMapper()
    • OID4VCTargetRoleMapper

      public OID4VCTargetRoleMapper(org.keycloak.models.KeycloakSession keycloakSession)
  • Method Details

    • getIndividualConfigProperties

      protected List<org.keycloak.provider.ProviderConfigProperty> getIndividualConfigProperties()
      Specified by:
      getIndividualConfigProperties in class OID4VCMapper
    • 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
    • getDisplayType

      public String getDisplayType()
    • getHelpText

      public String getHelpText()
    • create

      public static org.keycloak.models.ProtocolMapperModel create(String name)
    • create

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

      public void validateConfig(org.keycloak.models.KeycloakSession session, org.keycloak.models.RealmModel realm, org.keycloak.models.ProtocolMapperContainerModel client, org.keycloak.models.ProtocolMapperModel mapperModel) throws org.keycloak.protocol.ProtocolMapperConfigException
      Throws:
      org.keycloak.protocol.ProtocolMapperConfigException
    • getId

      public String getId()
    • 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