-
Notifications
You must be signed in to change notification settings - Fork 108
Description
When trying to present a jwt_vc credential using OpenID4VP, the wallet fails with:
Element class kotlinx.serialization.json.JsonArray is not a JsonPrimitive
It happens at the moment the wallet tries to present the VC after opening the deeplink.
Expected behavior
Wallet should accept the JWT VC and proceed with VP creation / submission.
Actual behavior
Wallet crashes/fails with Kotlin serialization error:
Element class kotlinx.serialization.json.JsonArray is not a JsonPrimitive
Deeplink used
openid4vp://authorize?response_type=vp_token&client_id=http%3A%2F%2Flocalhost%3A7003%2Fopenid4vc%2Fverify&response_mode=direct_post&state=E55t9sbQQxXQ&presentation_definition_uri=http%3A%2F%2Flocalhost%3A7003%2Fopenid4vc%2Fpd%2FE55t9sbQQxXQ&client_id_scheme=redirect_uri&client_metadata=%7B%22authorization_encrypted_response_alg%22%3A%22ECDH-ES%22%2C%22authorization_encrypted_response_enc%22%3A%22A256GCM%22%7D&nonce=eb7af869-bd3c-4e00-a838-fce66d7a707f&response_uri=http%3A%2F%2Flocalhost%3A7003%2Fopenid4vc%2Fverify%2FE55t9sbQQxXQ
Version used
https://github.com/walt-id/waltid-identity
Reproduction steps
- Call verifier endpoint to generate deeplink:
curl -X POST 'http://217.154.108.26:7003/openid4vc/verify' \
-H 'accept: text/plain' \
-H 'authorizeBaseUrl: openid4vp://authorize' \
-H 'responseMode: direct_post' \
-H 'Content-Type: application/json' \
-d '{
"vc_policies": ["signature","expired","not-before","revoked-status-list"],
"request_credentials": [{
"format": "jwt_vc",
"input_descriptor": {
"id": "e3d700aa-0988-4eb6-b9c9-e00f4b27f1d8",
"constraints": {
"fields": [{
"path": ["$.vc.type"],
"filter": {
"contains": { "const": "DataspaceParticipantCredential" },
"type": "array"
}
}]
}
}
}]
}