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

Update examples securing Verifiable Presentations #225

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 21 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ <h2>Securing JSON-LD Verifiable Credentials with JOSE</h2>
<h2>Securing JSON-LD Verifiable Presentations with JOSE</h2>
<p>
This section details how to use JOSE to secure verifiable presentations conforming
to [[VC-DATA-MODEL-2.0]].
to [[VC-DATA-MODEL-2.0]].
</p>
<p>
[[RFC7515]] MAY be used to secure this media type.
Expand All @@ -291,6 +291,14 @@ <h2>Securing JSON-LD Verifiable Presentations with JOSE</h2>
for additional details regarding usage of <code>typ</code> and
<code>cty</code>.
</p>
<p>
Credentials in verifiable presentations MUST use the <a data-cite="VC-DATA-MODEL-2.0/#defn-EnvelopedVerifiableCredential">Enveloped Verifiable Credential</a>
type defined by the [[VC-DATA-MODEL-2.0]].
</p>
<p>
Credentials in verifiable presentations MUST be secured. These credentials MAY
be secured using JOSE.
<p>

<pre class="example vc-jose-cose" title="A simple example of a verifiable presentation">
{
Expand All @@ -300,21 +308,12 @@ <h2>Securing JSON-LD Verifiable Presentations with JOSE</h2>
],
"type": "VerifiablePresentation",
"verifiableCredential": [{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2"
],
"@context": ["https://www.w3.org/ns/credentials/v2"],
"id": "http://university.example/credentials/1872",
iherman marked this conversation as resolved.
Show resolved Hide resolved
decentralgabe marked this conversation as resolved.
Show resolved Hide resolved
"type": ["VerifiableCredential", "ExampleAlumniCredential"],
"type": ["EnvelopedVerifiableCredential"],
"issuer": "https://university.example/issuers/565049",
"validFrom": "2010-01-01T19:23:24Z",
decentralgabe marked this conversation as resolved.
Show resolved Hide resolved
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"alumniOf": {
"id": "did:example:c276e12ec21ebfeb1f712ebc6f1",
"name": "Example University"
}
}
"id": "data:application/vc+ld+json+sd-jwt;eyJhbGciOiJFUzM4NCIsImtpZCI6IlVRTV9fblE0UzZCTzhuUTRuT05YeHB4aHRob3lOeGI1M0xZZ1l6LTJBQnMiLCJ0eXAiOiJ2cCtsZCtqc29uK3NkLWp3dCIsImN0eSI6InZwK2xkK2pzb24ifQ.eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvdjIiLCJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvZXhhbXBsZXMvdjIiXSwidmVyaWZpYWJsZUNyZWRlbnRpYWwiOlt7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy9ucy9jcmVkZW50aWFscy92MiIsImh0dHBzOi8vd3d3LnczLm9yZy9ucy9jcmVkZW50aWFscy9leGFtcGxlcy92MiJdLCJpc3N1ZXIiOiJodHRwczovL3VuaXZlcnNpdHkuZXhhbXBsZS9pc3N1ZXJzLzU2NTA0OSIsInZhbGlkRnJvbSI6IjIwMTAtMDEtMDFUMTk6MjM6MjRaIiwiY3JlZGVudGlhbFN1YmplY3QiOnsiYWx1bW5pT2YiOnsibmFtZSI6IkV4YW1wbGUgVW5pdmVyc2l0eSIsIl9zZCI6WyJoek9LRzU2cDI5c1ByTGFDNUE4RndFdUczVU05dUlZU1p1cU9YczJlVGJBIl19LCJfc2QiOlsiWVdXVmVDRndxQmk4WDBqSF9jV0NWWU16STNhOHBjTEVYRWZicFNSQVlndyJdfSwiX3NkIjpbIjJJZjhhaUs4REZwVWJ4dEc1cGMwel9SaFJzbm1ybGFRMEhzcTk4WFNyYWsiLCJUeDZ4ZWZMVU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ZWJmZWIxZjcxMmViYzZmMSJd"
}]
}
</pre>
Expand Down Expand Up @@ -366,9 +365,17 @@ <h2>Securing JSON-LD Verifiable Presentations with COSE</h2>
<p>
[[RFC9052]] MAY be used to secure this media type.
The <code>typ</code> header parameter SHOULD be <code>application/vp+ld+json+sd-jwt</code>.
When present, the <code>cty</code> header parameter SHOULD be <code>application/vp+ld+json</code>.
When present, the <code>cty</code> header parameter SHOULD be <code>application/vp+ld+json</code>.
See <a data-cite="RFC9052#section-3.1">Common COSE Header Parameters</a> for additional details.
</p>
<p>
Credentials in verifiable presentations MUST use the <a data-cite="VC-DATA-MODEL-2.0/#defn-EnvelopedVerifiableCredential">Enveloped Verifiable Credential</a>
type defined by the [[VC-DATA-MODEL-2.0]].
</p>
<p>
Credentials in verifiable presentations MUST be secured. These credentials MAY
be secured using COSE.
<p>

</section>
</section>
Expand Down
Loading