eu-digital-identity-wallet / eudi-lib-ios-openid4vci-swift

Implementation of OpenID for Verifiable Credential Issuance protocol (wallet's role) in Swift
Apache License 2.0
4 stars 5 forks source link

Fix/Added decoding of credentials_supported key to parsing. #29

Closed marcelsalej closed 3 weeks ago

marcelsalej commented 2 months ago

Description of change

When testing walletKit on main branches, I noticed that issuing a PID or MDL stopped working.

Tested with EUDI demo issuer: https://issuer.eudiw.dev/oidc

Issue was that wrong key was provided based on issuer response:

{
  "credential_endpoint": "https://issuer.eudiw.dev/oidc/credential",
  "credential_issuer": "https://issuer.eudiw.dev/oidc",
  "credentials_supported": {
    "eu.europa.ec.eudiw.mdl_jwt_vc_json": {
      "credential_definition": {
        "credentialSubject": {
          "administrative_number": {
            "display": [
              {
                "locale": "en",
                "name": "An audit control number assigned by the issuing authority"
              }
            ],
            "mandatory": false
          }

Now app tries to decode credential_configurations_supported first. If this fails it will try to decode also credentials_supported

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

dtsiflit commented 1 month ago

Hello @marcelsalej, thank you for your PR! We removed credentials_supported according to draft 13 of the specification. This change is not part of the issuer (https://issuer.eudiw.dev/oidc) yet. I will make a comment here when the issuer supports draft 13.

Meanwhile, can you please check https://dev.issuer.eudiw.dev/? This does support draft 13 in this library.

dtsiflit commented 3 weeks ago

The issuer (https://issuer.eudiw.dev) now supports draft 13. There is no need to support credentials_supported. Thanks @marcelsalej I'll close this issue now.