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

Is there a copy-paste error in the examples of 3.1.2? #325

Open
paullatzelsperger opened this issue Jan 9, 2025 · 0 comments
Open

Is there a copy-paste error in the examples of 3.1.2? #325

paullatzelsperger opened this issue Jan 9, 2025 · 0 comments

Comments

@paullatzelsperger
Copy link

paullatzelsperger commented Jan 9, 2025

I read through the latest snapshot (at the time of writing) from December 19, 2024, and I was wondering if it is possible that there is a copy-paste error in the samples?

In particular, I'm referring to Section 3.1.2 Securing VPs with JOSE.

Example 2 shows a presentation that contains a single EnvelopedVerifiableCredential:

{
  "@context": [
    "https://www.w3.org/ns/credentials/v2",
    "https://www.w3.org/ns/credentials/examples/v2"
  ],
  "type": "VerifiablePresentation",
  "verifiableCredential": [{
    "@context": ["https://www.w3.org/ns/credentials/v2"],
    "type": ["EnvelopedVerifiableCredential"],
    "id": "data:application/vc+jwt,eyJra...DOfkR1fP"
  }]
}

Example 3 then shows an EnvelopedVerifiablePresentation:

{
  "@context": [
    "https://www.w3.org/ns/credentials/v2",
    "https://www.w3.org/ns/credentials/examples/v2"
  ],
  "type": "EnvelopedVerifiablePresentation",
  "id": "data:application/vp+jwt,eyJra...DOfkR1fP"
}

However, the JWT String in Example 3 is the same as in Example 2, which (to me) means one of two things:

1. Example 3 is incorrect

The JWT string in Example 3 should actually contain the JOSE representation of Example 2. But then, would one not double-wrap the VP in a JWT? because then the "id": data:... URL already contains the VP JWT, and again encoding the JSON structure of Example 3 as JWT would seem a bit pointless, since there already is a signed VP JWT in it.

3. This is intentional

If Example 3 is indeed correct, how could one represent several credentials in a single EnvelopedVerifiablePresentation? Because in its current form, Example 3 would mean that a EnvelopedVP can only contain one EnvelopedVC.

Could you shine some light on this?

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

1 participant