generateVerificationSessionForDcql

suspend fun generateVerificationSessionForDcql(requestTypes: Collection<VerificationSession.RequestType>, dcql: String, readerAuthenticationKey: AsymmetricKey.X509Compatible?, origin: String? = null, clientId: String? = null, transactionData: List<String>? = null, nonce: ByteString = ByteString(Random.nextBytes(18)), encryptResponse: Boolean = true, responseUri: String? = null, documentTypeRepository: DocumentTypeRepository? = null, deviceEngagement: ByteString? = null, handover: DataItem? = null, eReaderKey: EcPrivateKey? = null, state: String? = null): VerificationSession

Makes a request for credential presentation using W3C Digital Credentials API

Single DC request can contain sections for several protocols, the response always comes using only one of the requested protocols.

Return

a pair of the DC request and the session that is needed to process the response to that request

Parameters

requestTypes

list of request types that should be created; multiple requests can be created and sent, typically only one of these requests will be responded to

dcql

DCQL representation of the request, this gives the list of needed credentials and which claims are needed from each credential

origin

protocol and authority of the server that makes the request (e.g. https://example.com:8000) or an appropriate platform-specific origin for app-to-app requests

clientId

OpenID4VP client id, must be non-null for signed request

readerAuthenticationKey

certified key to sign the request, if null the request is unsigned

transactionData

transaction data in OpenID4VP JSON format (before Base64Url encoding), note that credentialId uses credential ids used in DCQL

nonce

nonce to use, for OpenID4VP it will be Base64Url encoded

encryptResponse

true if response must be encrypted

deviceEngagement

ISO 18013-5 device engagement data

handover

ISO 18013-5 handover data

documentTypeRepository

repository that contains all transaction types for transaction data that are used in the request; if no transaction data is used it can be null

state

optional state parameter for OpenID4VP protocol