impierce / identity-wallet

A Tauri-based Identity Wallet for people to manage Decentralized Identities and Verifiable Credentials.
https://www.impierce.com
Apache License 2.0
17 stars 4 forks source link

Use `name` and `logo.url` for issuer metadata lookup #247

Closed nanderstabel closed 1 week ago

nanderstabel commented 2 weeks ago

Description

Currently we use "client_name" and "logo_uri" to find the issuer_name and logo_uri, like this:

                let issuer_name = display["client_name"]
                    .as_str()
                    .map(|s| s.to_string())
                    .unwrap_or(credential_issuer_url.to_string());

                let logo_uri = display["logo_uri"].as_str().map(|s| s.to_string());

However, this is a custom NGDIL-specific way of obtaining these display properties (see: https://staging.api.ngdil.com/.well-known/openid-credential-issuer).

The display described in OID4VCI looks like can be found here: https://openid.github.io/OpenID4VCI/openid-4-verifiable-credential-issuance-wg-draft.html#section-11.2.3-2.10.2.3.2.2).

The specification should be leading which means we should look for these display properties through:

{
  "name": ...,
  "logo": {
    "url": ...
  }
}

If UniMe can not find these display properties it may try to find it via client_name and logo_uri.

Motivation

We should prioritize the OID4VCI specification.

Resources

https://staging.api.ngdil.com/.well-known/openid-credential-issuer https://openid.github.io/OpenID4VCI/openid-4-verifiable-credential-issuance-wg-draft.html#section-11.2.3-2.10.2.3.2.2

To-do List