-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
72 changed files
with
1,495 additions
and
18,674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# JSON Web Token Verifiable Credentials for ReSpec | ||
# Verifiable Credential Service Worker Plugin for ReSpec | ||
|
||
- [demo](https://transmute-industries.github.io/respec-vc-jwt/) | ||
|
||
|
@@ -8,69 +8,11 @@ But with support for v2, and no JSON-LD processing. | |
|
||
# Usage | ||
|
||
See [index.html](./index.html) | ||
|
||
To use this extension, include the following line in your ReSpec file: | ||
|
||
```html | ||
<script class="remove" src="https://cdn.jsdelivr.net/gh/transmute-industries/[email protected]/dist/main.js"></script> | ||
``` | ||
|
||
Note that there might be releases later than the one listed above. | ||
Check this repository's [tags](https://github.com/transmute-industries/respec-vc-jwt/tags) | ||
for all known releases. | ||
|
||
# ReSpec Markup | ||
|
||
To use this extension, you must add the `vc-jwt` class to your examples | ||
and optionally provide a digital proof verification method (e.g., | ||
a URL to a public key) via the `data-vc-kid` attribute. | ||
|
||
## Secured Verifiable Credential | ||
|
||
```html | ||
<pre class="example nohighlight vc-jwt" title="Usage of the id property" | ||
data-vc-kid="https://example.edu/issuers/565049#key-1"> | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://www.w3.org/2018/credentials/examples/v1" | ||
], | ||
<span class="highlight">"id": "http://example.edu/credentials/3732"</span>, | ||
"type": ["VerifiableCredential", "UniversityDegreeCredential"], | ||
"issuer": "https://example.edu/issuers/565049", | ||
"issuanceDate": "2010-01-01T00:00:00Z", | ||
"credentialSubject": { | ||
<span class="highlight">"id": "did:example:ebfeb1f712ebc6f1c276e12ec21"</span>, | ||
"degree": { | ||
"type": "BachelorDegree", | ||
"name": "Bachelor of Science and Arts" | ||
} | ||
} | ||
} | ||
</pre> | ||
``` | ||
|
||
## Unsecured Verifiable Presentation | ||
|
||
```html | ||
<pre class="example nohighlight vc-jwt" title="unsecured example" | ||
data-vp-alg="none"> | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://www.w3.org/2018/credentials/examples/v1" | ||
], | ||
<span class="highlight">"id": "http://example.edu/credentials/3732"</span>, | ||
"type": ["VerifiableCredential", "UniversityDegreeCredential"], | ||
"issuer": "https://example.edu/issuers/565049", | ||
"issuanceDate": "2010-01-01T00:00:00Z", | ||
"credentialSubject": { | ||
<span class="highlight">"id": "did:example:ebfeb1f712ebc6f1c276e12ec21"</span>, | ||
"degree": { | ||
"type": "BachelorDegree", | ||
"name": "Bachelor of Science and Arts" | ||
} | ||
} | ||
} | ||
</pre> | ||
``` | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.