VerificationSession

A serializable object that encapsulates all the information needed to process a verification request, possibly using multiple protocols.

Use VerificationUtil.generateVerificationSessionForDcql method to generate an instance of this class that contains a set of requests. Verification requests can be used to ask for credential presentment. Individual requests can be accessed using find method (or getDcRequest helper method that creates DC API object that can contains requests in several formats). The requests then should be sent to the credential holder, which will generate a single response (also known as "presentation"). Then use an appropriate "processXXXResponse" method to process the response and create a PresentmentRecord. PresentmentRecord then can then be verified either immediately or saved and verified (or re-verified) later and used to extract presented documents and transaction processing results.

Parameters

requests

individual requests that are semantically equivalent, but formatted to be sent through various supported protocols

Constructors

Link copied to clipboard
constructor(requests: List<VerificationSession.Request>)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class DcIso18013Request(val origin: String, val responseEncryptionKey: EcPrivateKey, val deviceRequest: DataItem, val encryptionInfo: DataItem) : VerificationSession.Iso18013Request

ISO/IEC 18013 request using W3C DC API.

Link copied to clipboard
data class DcOpenID4VPDraft24Request(val requestorId: String, val responseEncryptionKey: EcPrivateKey?, val openID4VPRequest: String) : VerificationSession.OpenID4VPRequest

OpenID4VP request using W3C DC API, generated with OpenID4VP.Version.DRAFT_24. The W3C DC API protocol value is openid4vp regardless of whether the request is signed.

Link copied to clipboard
data class DcOpenID4VPRequest(val requestorId: String, val responseEncryptionKey: EcPrivateKey?, val openID4VPRequest: String) : VerificationSession.OpenID4VPRequest

OpenID4VP request using W3C DC API, generated with OpenID4VP.Version.DRAFT_29.

Link copied to clipboard
data class Iso18013ProximityRequest(val eDeviceKey: EcPrivateKey, val handover: DataItem, val deviceEngagement: ByteString, val deviceRequest: DataItem) : VerificationSession.Iso18013Request

ISO/IEC 18013 proximity request.

Link copied to clipboard

Request of ISO/IEC 18013 family type.

Link copied to clipboard

Request of OpenID4VP family type.

Link copied to clipboard
data class OpenID4VPUriSchemeRequest(val requestorId: String, val responseEncryptionKey: EcPrivateKey?, val openID4VPRequest: String) : VerificationSession.OpenID4VPRequest

OpenID4VP request using custom URI scheme.

Link copied to clipboard
sealed class Request

Ready-to-use request of a particular type and auxiliary data required for the response verification.

Link copied to clipboard

Describes available verification request types.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getDcRequest(): JsonObject

Generate W3C DC API request.

Link copied to clipboard
suspend fun processDcResponse(dcResponse: JsonObject): PresentmentRecord

Processes the W3C Digital Credentials API response.

Link copied to clipboard

Processes mdoc proximity presentation response.

Link copied to clipboard

Processes OpenID4VP response for URI scheme request.

Link copied to clipboard

Serializes this object to a string when serialization to a binary cannot be used.

Link copied to clipboard
Link copied to clipboard