addDocument
Low-level function to add a MdocDocument to the response.
Return
the builder.
Parameters
document
the MdocDocument to add to the response.
suspend fun addDocument(docType: String, issuerAuth: CoseSign1, issuerNamespaces: IssuerNamespaces, deviceNamespaces: DeviceNamespaces, deviceKey: AsymmetricKey, errors: Map<String, Map<String, Int>> = emptyMap()): DeviceResponse.Builder
Low-level function to add a MdocDocument to the response.
Return
the builder.
Parameters
docType
the type of the document, e.g. "org.iso.18013.5.1.mDL".
issuerAuth
the issuer-signed MSO.
issuerNamespaces
the issuer-signed data elements to return.
deviceNamespaces
the device-signed data elements to return.
deviceKey
a AsymmetricKey used to generate a signature or MAC.
errors
the errors to return.
suspend fun addDocument(credential: MdocCredential, requestedClaims: List<MdocRequestedClaim>, deviceNamespaces: DeviceNamespaces = buildDeviceNamespaces {}, errors: Map<String, Map<String, Int>> = emptyMap()): DeviceResponse.Builder
Adds an MdocCredential to the response.
Return
the builder.
Parameters
credential
the MdocCredential to return
requestedClaims
the claims in credential to return.
deviceNamespaces
additional device-signed claims to return.
errors
the errors to return.