Class MdocCredentialBuilder
java.lang.Object
org.keycloak.protocol.oid4vc.issuance.credentialbuilder.MdocCredentialBuilder
- All Implemented Interfaces:
CredentialBuilder,Provider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildCredentialBody(VerifiableCredential verifiableCredential, CredentialBuildConfig credentialBuildConfig) Builds a verifiable credential of a specific format from the basis of an internal representation of the credential.voidcontributeToMetadata(SupportedCredentialConfiguration credentialConfig, CredentialScopeModel credentialScope) Allows the credential builder to contribute format-specific metadata to the OID4VCI well-known credential issuer metadata.Returns list of supported binding methods for this credential formatReturns the credential format supported by the builder.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.protocol.oid4vc.issuance.credentialbuilder.CredentialBuilder
close
-
Constructor Details
-
MdocCredentialBuilder
public MdocCredentialBuilder()
-
-
Method Details
-
getSupportedFormat
Description copied from interface:CredentialBuilderReturns the credential format supported by the builder.- Specified by:
getSupportedFormatin interfaceCredentialBuilder
-
getSupportedBindingMethods
Description copied from interface:CredentialBuilderReturns list of supported binding methods for this credential format- Specified by:
getSupportedBindingMethodsin interfaceCredentialBuilder
-
buildCredentialBody
public MdocCredentialBody buildCredentialBody(VerifiableCredential verifiableCredential, CredentialBuildConfig credentialBuildConfig) throws CredentialBuilderException Description copied from interface:CredentialBuilderBuilds a verifiable credential of a specific format from the basis of an internal representation of the credential.The credential is built incompletely, intended that it would be signed externally.
- Specified by:
buildCredentialBodyin interfaceCredentialBuilder- Parameters:
verifiableCredential- an internal representation of the credentialcredentialBuildConfig- additional configurations for building the credential- Returns:
- the built verifiable credential of the specific format, ready to be signed
- Throws:
CredentialBuilderException
-
contributeToMetadata
public void contributeToMetadata(SupportedCredentialConfiguration credentialConfig, CredentialScopeModel credentialScope) Description copied from interface:CredentialBuilderAllows the credential builder to contribute format-specific metadata to the OID4VCI well-known credential issuer metadata.Implementations should add only the metadata fields required by the supported credential format (for example
vctfordc+sd-jwtorcredential_definitionforjwt_vc_json).The default implementation is a no-op to preserve backward compatibility.
- Specified by:
contributeToMetadatain interfaceCredentialBuilder- Parameters:
credentialConfig- the credential configuration to populate with format-specific metadatacredentialScope- the credential scope model containing the source data
-