Class OID4VCContextMapper
java.lang.Object
org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCMapper
org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCContextMapper
- All Implemented Interfaces:
OID4VCEnvironmentProviderFactory,ProtocolMapper,ConfiguredProvider,EnvironmentDependentProviderFactory,Provider,ProviderFactory<ProtocolMapper>
Allows to add the context to the credential subject
- Author:
- Stefan Wiedemann
-
Field Summary
FieldsFields inherited from class org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCMapper
CLAIM_NAME, format, MAPPER_MISSING_MDOC_NAMESPACE_ERROR, MAPPER_RESERVED_CLAIM_ERROR, mapperModel, MDOC_NAMESPACE, USER_ATTRIBUTE_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(KeycloakSession session) getId()protected List<ProviderConfigProperty>Returns the externally visible claim path used in credential metadata and authorization_details validation.booleanthis claim is not added by default to the metadatavoidsetClaim(Map<String, Object> claims, UserSessionModel userSessionModel) Set the claims to the credential subject.voidsetClaim(VerifiableCredential verifiableCredential, UserSessionModel userSessionModel) Set the claims to credential, like f.e. the contextbooleansupportsCredentialFormat(String credentialFormat) Some mappers target format-specific container fields instead of subject/data-element claims.Methods inherited from class org.keycloak.protocol.oid4vc.issuance.mappers.OID4VCMapper
close, getAllowedReservedClaims, getAttributePrefix, getClaimLookupPath, getClaimLookupPath, getClaimName, getClaimName, getConfigProperties, getDisplayCategory, getMapperName, getMetadataAttributePath, getProtocol, init, passesMappingGuards, postInit, prefixMetadataAttributePath, resolveClaimName, setClaimWithMetadataPrefix, setMapperModel, validate, validateAgainstSensitiveMappings, validateConfig, validateMdocNamespaceMethods 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
-
MAPPER_ID
- See Also:
-
TYPE_KEY
- See Also:
-
-
Constructor Details
-
OID4VCContextMapper
public OID4VCContextMapper()
-
-
Method Details
-
getIndividualConfigProperties
- Specified by:
getIndividualConfigPropertiesin classOID4VCMapper
-
includeInMetadata
public boolean includeInMetadata()this claim is not added by default to the metadata- Overrides:
includeInMetadatain classOID4VCMapper
-
supportsCredentialFormat
Description copied from class:OID4VCMapperSome mappers target format-specific container fields instead of subject/data-element claims. Callers use this hook for both metadata and issuance so unsupported mappers are not advertised or applied for a credential format.- Overrides:
supportsCredentialFormatin classOID4VCMapper
-
getMetadataAttributePath
Description copied from class:OID4VCMapperReturns the externally visible claim path used in credential metadata and authorization_details validation. JSON credentials use their normal credentialSubject/top-level paths; mDoc prepends the configured namespace because OID4VCI mDoc paths address namespace -> data element -> optional nested value.- Overrides:
getMetadataAttributePathin classOID4VCMapper
-
setClaim
Description copied from class:OID4VCMapperSet the claims to credential, like f.e. the context- Specified by:
setClaimin classOID4VCMapper
-
setClaim
Description copied from class:OID4VCMapperSet the claims to the credential subject.- Specified by:
setClaimin classOID4VCMapper
-
getDisplayType
-
getHelpText
-
create
-
getId
-