walt-id / waltid-walletkit

Toolkit for SSI and NFT/SBT wallets
https://docs.walt.id
Apache License 2.0
31 stars 25 forks source link

ESSIF Authorization API flow stops with an error (argument type mismatch) #77

Closed sylfax closed 1 year ago

sylfax commented 1 year ago

I try to generate a Issuer DID from the waltid wallet backend (last version). The first steps works well: 1) generate a key 2) generate a DID 3) onboarding user

But i have an error when I execute the following command: waltid-walletkit config --as-issuer essif auth-api --did <MYDID>

The error is the following: `walt.id SSI Kit 1.13.0-SNAPSHOT (running on Java 17.0.3+6-LTS) [main] DEBUG id.walt.services.WaltIdServices - Creating dir-structure at: data

[main] INFO id.walt.webwallet.backend.cli.ConfigCmd - Running in context of: Issuer EBSI Authentication API flow for DID did:ebsi:zucQiTU2Ez5NgzhwpvsXM7w running...

[main] DEBUG id.walt.services.ecosystems.essif.EssifClient - ESSIF Authorization API flow started [main] DEBUG id.walt.services.ecosystems.essif.userwallet.UserWalletService - Loading Verifiable Authorization from HKV Store. Exception in thread "main" com.beust.klaxon.KlaxonException: Unable to instantiate EbsiVAWrapper: Parameter verifiableCredential: expected id.walt.services.ecosystems.essif.EbsiVa but received java.lang.String (value: eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QiLCJraWQiOiJkaWQ6ZWJzaTp6cjJyV0RISHJVQ2RaQVc3d3NTYjVuUSNrZXlzLTEifQ.eyJqdGkiOiJ2YzplYnNpOmF1dGhlbnRpY2F0aW9uI2MxZWE4NzI3LTA5NWYtNDY0Mi05N2ExLTIzYjg2ZDZiMzgyNSIsInN1YiI6ImRpZDplYnNpOnp1Y1FpVFUyRXo1Tmd6aHdwdnNYTTd3IiwiaXNzIjoiZGlkOmVic2k6enIycldESEhyVUNkWkFXN3dzU2I1blEiLCJuYmYiOjE2NzM0NDc2MjYsImV4cCI6MTY4OTE3MjQyNiwiaWF0IjoxNjczNDQ3NjI2LCJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJpZCI6InZjOmVic2k6YXV0aGVudGljYXRpb24jYzFlYTg3MjctMDk1Zi00NjQyLTk3YTEtMjNiODZkNmIzODI1IiwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIlZlcmlmaWFibGVBdXRob3Jpc2F0aW9uIl0sImlzc3VlciI6ImRpZDplYnNpOnpyMnJXREhIclVDZFpBVzd3c1NiNW5RIiwiaXNzdWFuY2VEYXRlIjoiMjAyMy0wMS0xMVQxNDozMzo0NloiLCJpc3N1ZWQiOiIyMDIzLTAxLTExVDE0OjMzOjQ2WiIsInZhbGlkRnJvbSI6IjIwMjMtMDEtMTFUMTQ6MzM6NDZaIiwiZXhwaXJhdGlvbkRhdGUiOiIyMDIzLTA3LTEyVDE0OjMzOjQ2WiIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmVic2k6enVjUWlUVTJFejVOZ3pod3B2c1hNN3cifSwiY3JlZGVudGlhbFNjaGVtYSI6eyJpZCI6Imh0dHBzOi8vYXBpLXBpbG90LmVic2kuZXUvdHJ1c3RlZC1zY2hlbWFzLXJlZ2lzdHJ5L3YyL3NjaGVtYXMvekhNcDUyTHFKV29jbWhBOVJrem5UV3VFZWNKWG9QREt3M2tXUXA4MVlZOXBDIiwidHlwZSI6IkZ1bGxKc29uU2NoZW1hVmFsaWRhdG9yMjAyMSJ9fX0.e5mxppIVTzMpZLfOcmKkDye6waYxnyiACLTs99rv0MkoHguQy2v7FgQ4QOj3v4AaKeinq12Hs8jeb0fhwolQXQ) argument type mismatch

at com.beust.klaxon.JsonObjectConverter.initIntoUserClass(JsonObjectConverter.kt:115)
at com.beust.klaxon.JsonObjectConverter.fromJson(JsonObjectConverter.kt:30)
at com.beust.klaxon.DefaultConverter.fromJsonObject(DefaultConverter.kt:223)
at com.beust.klaxon.DefaultConverter.fromJson(DefaultConverter.kt:40)
at com.beust.klaxon.Klaxon.fromJsonObject(Klaxon.kt:296)
at id.walt.services.ecosystems.essif.userwallet.UserWalletService.createVerifiedClaims(UserWalletService.kt:579)
at id.walt.services.ecosystems.essif.userwallet.UserWalletService.siopSession(UserWalletService.kt:217)
at id.walt.services.ecosystems.essif.userwallet.UserWalletService.requestAccessToken(UserWalletService.kt:118)
at id.walt.services.ecosystems.essif.EssifClient.authApi(EssifClient.kt:236)
at id.walt.cli.EssifAuthCommand.run(EssifCommand.kt:66)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:198)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:18)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:400)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:397)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:415)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:440)
at id.walt.MainKt$main$1.invokeSuspend(Main.kt:101)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at id.walt.MainKt.main(Main.kt:26)

`

philpotisk commented 1 year ago

Hi @sylfax thanks for raising this issue. It should be fixed by the latest updates in the SSI Kit https://github.com/walt-id/waltid-ssikit/pull/206

Please be aware that the link for fetching the EBSI bearer token has changed to: https://app-pilot.ebsi.eu/users-onboarding/v2

sylfax commented 1 year ago

Hi,

Thank you for correcting the issue. But now I have another blocking error at the same step but with another error. I just created another issue for the new blocking error.

Best regards