Iso18013PresentmentRecord

class Iso18013PresentmentRecord(val response: DataItem, val sessionTranscript: DataItem, val request: DataItem, val eDeviceKey: EcPrivateKey?, val encryptionInfo: ByteString?, val origin: String?) : PresentmentRecord

PresentmentRecord for ISO 18013-5 mdoc presentment.

TODO: support recording Annex A, proximity and zero-knowledge presentations as well.

Constructors

Link copied to clipboard
constructor(response: DataItem, sessionTranscript: DataItem, request: DataItem, eDeviceKey: EcPrivateKey?, encryptionInfo: ByteString?, origin: String?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

session encryption key (only required for proximity presentations).

Link copied to clipboard
val encryptionInfo: ByteString?

encryption info from the Digital Credentials API, only needed for nonce verification.

Link copied to clipboard

the web origin that initiated the presentment request, only needed for nonce verification.

Link copied to clipboard

original ISO 18013 request

Link copied to clipboard

CBOR-encoded DeviceResponse as defined in ISO 18013-5.

Link copied to clipboard

CBOR SessionTranscript used for presentment authentication.

Functions

Link copied to clipboard
open suspend override fun verify(atTime: Instant, documentTypeRepository: DocumentTypeRepository?, zkSystemRepository: ZkSystemRepository?): List<VerifiedPresentation>

Verifies the cryptographic validity of the presentment and the issuer trust chain. This includes verifying that the credential holder approved all transactions that apply to the presented credentials, even if no data was sent as a response for a given transaction.

Link copied to clipboard
open suspend override fun verifyNonce(nonce: ByteString)

Verifies that the presentation was bound to the expected nonce.