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

Credential branding issues #274

Open
zpangrsic-eq opened this issue Nov 13, 2024 · 1 comment
Open

Credential branding issues #274

zpangrsic-eq opened this issue Nov 13, 2024 · 1 comment

Comments

@zpangrsic-eq
Copy link

zpangrsic-eq commented Nov 13, 2024

There seems to be a bug with Credential Branding.

When we itterate over the credential branding as linked bellow

const localeBranding: Array<IBasicCredentialLocaleBranding> | undefined = credentialBranding?.[credentialId]

the code here:

const localeBranding: Array<IBasicCredentialLocaleBranding> | undefined = credentialBranding?.[credentialId]

wants to find a object with key referencing the credentialId, but the

export const getCredentialBranding = async (args: GetCredentialBrandingArgs): Promise<Record<string, Array<IBasicCredentialLocaleBranding>>> => {

The above command is ran here in the OID4VCIHolder class:

const credentialBranding = await getCredentialBranding({ credentialsSupported, context })

returns an Object containing types eg: UniversalCredential and not the credentialId.

@sanderPostma
Copy link
Contributor

@zpangrsic-nchain
credential_configurations_supported entries do not have an id field anymore, so I assume you mean the map key of credential_configurations_supported.

{
  "credential_configurations_supported": {
    "UniversityDegreeCredential": {
      "format": "jwt_vc_json",
      "scope": "UniversityDegree",
      "cryptographic_binding_methods_supported": [
        "did:example"
      ],
      "credential_signing_alg_values_supported": [
        "ES256"
      ],
      "credential_definition": {
        "type": [
          "VerifiableCredential",
          "UniversityDegreeCredential"
        ],
        "credentialSubject": {
        ...

I see we have been using the type (!= VerifyableCredential) which is often equal to the id. I am leaning towards adding a mapBy: 'key' | 'type' arg to not break existing implementations, but I will need to discuss internally.

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

No branches or pull requests

2 participants