Class MdocCredential

java.lang.Object
org.keycloak.mdoc.MdocCredential

public class MdocCredential extends Object
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 Details

  • Method Details

    • addKeyBinding

      public void addKeyBinding(JWK jwk)
      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

      public MdocIssuerSignedDocument signAsIssuerSignedDocument(SignatureSignerContext signerContext)
      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

      public String getDocType()
    • getClaims

      public Map<String,Object> getClaims()
    • getNamespacedClaims

      public List<MdocNamespacedClaims> getNamespacedClaims()
    • getValidityInfo

      public MdocValidityInfo getValidityInfo()