Package org.keycloak.mdoc
Class MdocCredential
java.lang.Object
org.keycloak.mdoc.MdocCredential
Representation of an ISO mdoc credential before it is serialized as IssuerSigned.
The input claims are already arranged as mdoc namespaces. Signing converts each data element into
IssuerSignedItemBytes, hashes those bytes into the Mobile Security Object, optionally embeds the holder DeviceKey,
and signs the MSO as the IssuerAuth COSE_Sign1 structure.
-
Constructor Summary
ConstructorsConstructorDescriptionMdocCredential(String docType, List<MdocNamespacedClaims> nameSpaces, MdocValidityInfo validityInfo) MdocCredential(String docType, Map<String, Object> claims, MdocValidityInfo validityInfo) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddKeyBinding(JWK jwk) Adds holder binding by converting the proof JWK into the COSE_Key stored in DeviceKeyInfo.signAsIssuerSignedDocument(SignatureSignerContext signerContext) Signs the credential and returns a decoded view of the IssuerSigned structure.
-
Constructor Details
-
MdocCredential
-
MdocCredential
public MdocCredential(String docType, List<MdocNamespacedClaims> nameSpaces, MdocValidityInfo validityInfo)
-
-
Method Details
-
addKeyBinding
Adds holder binding by converting the proof JWK into the COSE_Key stored in DeviceKeyInfo.- Parameters:
jwk- the holder public key from the JWT proof
-
signAsIssuerSignedDocument
Signs the credential and returns a decoded view of the IssuerSigned structure.- Parameters:
signerContext- signer for the IssuerAuth COSE_Sign1 structure- Returns:
- decoded view of the signed IssuerSigned structure
-
getDocType
-
getClaims
-
getNamespacedClaims
-
getValidityInfo
-