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

Expressing requested claims in the Verifiable Credentials example #5

Closed
Sakurann opened this issue Apr 28, 2023 · 3 comments
Closed
Assignees

Comments

@Sakurann
Copy link
Contributor

Sakurann commented Apr 28, 2023

for a verifiable credential example,if a credential format is specified (vc+sd-jwt in your example), there is no need to provide a JSON.Path to different potential variations of how a claim name can be expressed, because "the path" where to find a claim name will be determined by the credential format and credential type.

Could a structure like below be sufficient?

// Gets a SD-JWT from a VC holder.
const {response} = await navigator.credentials.get({
  identity: {
    providers: [{
      vc: {
        nonce: "m5tGxUIsFtLi6pwg",
        format: { 
            vc+sd-jwt: { 
                alg: ["EdDSA", "ES256"]
            }
         },
         type: "UniversityDegreeCredential",
         credentialSubject: {
             family_name: {
	         intent_to_retain: false
              },
             birth_date: {
		   mandatory: true,
             },
             driving_privileges: {
             } 
         }
      }
    }]
  }
});
@samuelgoto
Copy link
Collaborator

Could a structure like below be sufficient?

Yeah, I do think a variation of this structure would be possible. Here is how we could accomplish this in more WebIDL-friendly terms:

// Gets a SD-JWT from a VC holder.
const {response} = await navigator.credentials.get({
  identity: {
    providers: [{
      vc: {
        params: {
          nonce: "m5tGxUIsFtLi6pwg",
        },
        selector: {
          format: {
              type: "vc+sd-jwt",
              alg: ["EdDSA", "ES256"]
           },
           type: "UniversityDegreeCredential",
           credentialSubject: {
               family_name: { 
	         intent_to_retain: false
               },
               birth_date: {
		 mandatory: true,
               },
               driving_privileges: {
               } 
           }
        }
      }]
    }
  }
});

WDYT?

@marcoscaceres
Copy link
Collaborator

marcoscaceres commented Jan 25, 2024

@samuelgoto, as this refers to an old proposal, should we close this out?

At the same time, it would be great to start thinking about adding some examples of usage to the spec. Would be great to collaborate with @Sakurann on one or more.

We should probably add examples as we add things to the registry (#58)

@Sakurann
Copy link
Contributor Author

Sakurann commented Aug 1, 2024

i think you can close this one since it uses the old proposal.

happy to help with the examples. let me know where is the best place.

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

4 participants