Class OID4VCTargetRoleMapper
java.lang.Object
org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCMapper
org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCTargetRoleMapper
- All Implemented Interfaces:
OID4VCEnvironmentProviderFactory,ProtocolMapper,ConfiguredProvider,EnvironmentDependentProviderFactory,Provider,ProviderFactory<ProtocolMapper>
Adds the users roles to the credential subject
- Author:
- Stefan Wiedemann
-
Field Summary
FieldsFields inherited from class org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCMapper
CLAIM_NAME, format, mapperModel, USER_ATTRIBUTE_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProtocolMapperModelcreate(KeycloakSession session) getId()protected List<ProviderConfigProperty>must return ordered list of attribute-names as they are added into the credential.voidsetClaimsForCredential(VerifiableCredential verifiableCredential, UserSessionModel userSessionModel) Set the claims to credential, like f.e.voidsetClaimsForSubject(Map<String, Object> claims, UserSessionModel userSessionModel) Set the claims to the credential subject.voidvalidateConfig(KeycloakSession session, RealmModel realm, ProtocolMapperContainerModel client, ProtocolMapperModel mapperModel) Called when instance of mapperModel is created/updated for this protocolMapper through admin endpointMethods inherited from class org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCMapper
close, getAttributePrefix, getConfigProperties, getDisplayCategory, getProtocol, includeInMetadata, init, postInit, setMapperModelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.provider.ConfiguredProvider
getConfigMethods inherited from interface org.keycloak.protocol.oid4vc.OID4VCEnvironmentProviderFactory
isSupportedMethods inherited from interface org.keycloak.protocol.ProtocolMapper
getEffectiveModel, getPriorityMethods inherited from interface org.keycloak.provider.ProviderFactory
dependsOn, getConfigMetadata, order
-
Field Details
-
DEFAULT_CLAIM_NAME
- See Also:
-
CLIENT_CONFIG_KEY
- See Also:
-
MAPPER_ID
- See Also:
-
-
Constructor Details
-
OID4VCTargetRoleMapper
public OID4VCTargetRoleMapper() -
OID4VCTargetRoleMapper
-
-
Method Details
-
getIndividualConfigProperties
- Specified by:
getIndividualConfigPropertiesin classOID4VCMapper
-
getMetadataAttributePath
Description copied from class:OID4VCMappermust 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:
getMetadataAttributePathin classOID4VCMapper- Returns:
- the attribute path that is being mapped into the credential
-
getDisplayType
-
getHelpText
-
create
-
create
-
validateConfig
public void validateConfig(KeycloakSession session, RealmModel realm, ProtocolMapperContainerModel client, ProtocolMapperModel mapperModel) throws ProtocolMapperConfigException Description copied from interface:ProtocolMapperCalled when instance of mapperModel is created/updated for this protocolMapper through admin endpointclient- client or clientTemplate- Throws:
ProtocolMapperConfigException- if configuration provided in mapperModel is not valid
-
getId
-
setClaimsForCredential
public void setClaimsForCredential(VerifiableCredential verifiableCredential, UserSessionModel userSessionModel) Description copied from class:OID4VCMapperSet the claims to credential, like f.e. the context- Specified by:
setClaimsForCredentialin classOID4VCMapper
-
setClaimsForSubject
Description copied from class:OID4VCMapperSet the claims to the credential subject.- Specified by:
setClaimsForSubjectin classOID4VCMapper
-