VerificationUtil

Utility functions for requesting and verifying credentials.

Functions

Link copied to clipboard
suspend fun decryptDcResponse(response: JsonObject, nonce: ByteString, origin: String, responseEncryptionKey: AsymmetricKey?): DcResponse

Decrypts a W3C Digital Credentials response.

Link copied to clipboard
suspend fun generateDcRequestMdoc(exchangeProtocols: List<String>, docType: String, claims: List<MdocRequestedClaim>, nonce: ByteString, origin: String, clientId: String?, responseEncryptionKey: EcPublicKey?, readerAuthenticationKey: AsymmetricKey.X509Compatible?, zkSystemSpecs: List<ZkSystemSpec>): JsonObject

Utility function to generate a W3C Digital Credentials API request for requesting a single ISO mdoc credential.

Link copied to clipboard
suspend fun generateDcRequestSdJwt(exchangeProtocols: List<String>, vct: List<String>, claims: List<JsonRequestedClaim>, nonce: ByteString, origin: String, clientId: String?, responseEncryptionKey: EcPublicKey?, readerAuthenticationKey: AsymmetricKey?): JsonObject

Utility function to generate a W3C Digital Credentials API request for requesting a single SD-JWT credential.

Link copied to clipboard
suspend fun verifyMdocDeviceResponse(now: Instant, deviceResponse: DataItem, sessionTranscript: DataItem, eReaderKey: AsymmetricKey?, documentTypeRepository: DocumentTypeRepository?, zkSystemRepository: ZkSystemRepository?): List<VerifiedPresentation>

Generates VerifiedPresentation from an ISO 18013-5 response.

Link copied to clipboard
suspend fun verifyOpenID4VPResponse(now: Instant, vpToken: JsonObject, sessionTranscript: DataItem, nonce: ByteString, documentTypeRepository: DocumentTypeRepository?, zkSystemRepository: ZkSystemRepository?): List<VerifiedPresentation>

Generates VerifiedPresentation from an OpenID4VP response.

Link copied to clipboard
fun verifySdJwtPresentation(now: Instant, compactSerialization: String, nonce: ByteString, documentTypeRepository: DocumentTypeRepository?): VerifiedPresentation

Generates VerifiedPresentation from an SD-JWT / SD-JWT+KB presentation.