Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Element class kotlinx.serialization.json.JsonObject is not a JsonPrimitive #69

Closed
aridder opened this issue Jan 17, 2024 · 4 comments
Labels

Comments

@aridder
Copy link
Contributor

aridder commented Jan 17, 2024

Im trying to use the web-wallet to receive a credential im issuing in another server using waltid ssi-kit. Im getting this error:

happening on line SSIKit2WalletService.kt:447

credentialResponse: CredentialResponse(format=ldp_vc, credential={"credentialSubject":{"size":"Large","id":"did:key:z6MkmVY1aRT29HH7khh3YXoqQhfeyrtFefi8n1WCSbxbFfCz"},"credentialBranding":{"watermarkImageUrl":"https://example.edu/img/watermark.png","backgroundColor":"#7661e0"},"description":"bevis for spist kake","validFrom":"2024-01-17T16:41:52Z","type":["VerifiableCredential","KakeCredential"],"title":"Kakebevis","@context":["https://www.w3.org/2018/credentials/v1","https://mattr.global/contexts/vc-extensions/v2","https://schema.org"],"issuer":{"name":"Team Kanakas","id":"did:key:z6MkjnAh1nWKSo7nxAtUuzYZwtLaWY5oqn1iS7XGx7266HWk","logoUrl":""},"credentialStatus":{"statusPurpose":"revocation","statusListIndex":"37","id":"http://localhost/status/revocation#37","statusListCredential":"http://localhost/status/revocation","type":"StatusList2021Entry"},"issuanceDate":"2024-01-17T16:41:52Z","name":"Kakebevis","id":"urn:uuid:bf90acc3-65f0-4eb5-a71f-02ee6d92f6c5","proof":{"created":"2024-01-17T16:41:52Z","jws":"eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..ZGjtgaxHAmodfuT0wJtua_NMYyVOB0nXA5oOPB4c1NoHgsXPxJjGSkHxL6lTDIMZkyo-phf6ZBzv2G4YVhQjCw","proofPurpose":"assertionMethod","type":"Ed25519Signature2018","verificationMethod":"did:key:z6MkjnAh1nWKSo7nxAtUuzYZwtLaWY5oqn1iS7XGx7266HWk#z6MkjnAh1nWKSo7nxAtUuzYZwtLaWY5oqn1iS7XGx7266HWk"},"issued":"2024-01-17T16:41:52Z","expirationDate":"2024-02-16T16:41:51Z"}, acceptanceToken=null, cNonce=null, cNonceExpiresIn=null, error=null, errorDescription=null, errorUri=null, customParameters={c_nounce_expires_in=86400, c_nounce="fGFF7UkhLa"})

wallet-backend-1     | // parse and verify credential(s)
wallet-backend-1     | java.lang.IllegalArgumentException: Element class kotlinx.serialization.json.JsonObject is not a JsonPrimitive
wallet-backend-1     |  at kotlinx.serialization.json.JsonElementKt.error(JsonElement.kt:326)
wallet-backend-1     |  at kotlinx.serialization.json.JsonElementKt.getJsonPrimitive(JsonElement.kt:229)
wallet-backend-1     |  at id.walt.webwallet.service.SSIKit2WalletService.useOfferRequest(SSIKit2WalletService.kt:447)
Copy link

This issue has been marked as stale.

@github-actions github-actions bot added the Stale label Mar 17, 2024
@waltkb waltkb reopened this Mar 24, 2024
@github-actions github-actions bot closed this as completed Apr 1, 2024
@waltkb waltkb removed the Stale label Jun 4, 2024
@waltkb waltkb reopened this Jun 4, 2024
@waltkb
Copy link
Contributor

waltkb commented Jun 25, 2024

@severinstampler Linked data proof instead of JWT signature?

@severinstampler
Copy link
Contributor

yes indeed, the wallet service (and issuer service) doesn't currently support the ldp_vc credential format. The ssikit issuer used to support it.
The wallet service assumes the credential to be a string value (jwt), whereas in case of ldp_vc the credential is a json object.

Copy link

This issue has been marked as stale.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants