Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-dht-example
Browse files Browse the repository at this point in the history
nitro-neal committed Mar 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents deb64f4 + 3b7f2c3 commit 7b292cb
Showing 16 changed files with 498 additions and 164 deletions.
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Important!

Make sure that if you are updating a test vector that you test in the following repos before merging!

https://github.com/TBD54566975/web5-js
https://github.com/TBD54566975/web5-kt
https://github.com/TBD54566975/web5-swift
278 changes: 121 additions & 157 deletions README.md

Large diffs are not rendered by default.

Empty file added spec/did-metadata.json
Empty file.
Empty file added spec/did-resolution.json
Empty file.
Empty file added spec/did.json
Empty file.
92 changes: 92 additions & 0 deletions spec/did.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# W3C Decentralized Identifiers v1.0

The [DID Core data model](https://www.w3.org/TR/did-core) provides optionality for many of its properties, as it is designed as an [abstract data model](https://www.w3.org/TR/did-core/#representations). This means that many properties can be represented in different ways while still being spec conformant, properties can take on multiple concrete types (i.e. sometimes a string, sometimes an array), and documents can be extended to include additional properties either through the [DID Specification Registry](https://www.w3.org/TR/did-spec-registries/) or via usage of [JSON-LD](https://www.w3.org/TR/json-ld11/).

This optionality can be difficult to implement consistently across languages. As a consequence, this specification defines a strict subset of the DID Core v1.0 data model represented by the following table. As a utility JSON Schemas for [DID Documents](did-document.json), [DID Resolution Metadata](did-resolution.json), and [DID Document Metadata](did-metadata.json) are provided to aid in the validation of conformant documents.

## DID Document Data Model

Following from [this data model](https://www.w3.org/TR/did-core/#core-properties).

| Property | JSON Representation | Required | Notes |
| ------------- | ------------------- | -------- | -------------- |
| `id` | String | Yes | Must be a URI. |
| `@context` | Array of strings | No | Depends on the DID method. |
| `controller` | Array of strings | No | Depends on the DID method. Strings must be URIs. |
| `alsoKnownAs` | Array of strings | No | Depends on the DID method. Strings must be URIs. |
| `verificationMethod` | Array of [Verification Methods](#verification-method-data-model) | Yes | There must be at least one Verification Method in each DID Document. |
| `authentication` | Array of strings | No | String values must be fully qualified DID URIs (e.g. `did:example:abcd#key-1` over `#key-1`). |
| `assertionMethod` | Array of strings | No | String values must be fully qualified DID URIs (e.g. `did:example:abcd#key-1` over `#key-1`). |
| `keyAgreement` | Array of strings | No | String values must be fully qualified DID URIs (e.g. `did:example:abcd#key-1` over `#key-1`). |
| `capabilityInvocation` | Array of strings | No | String values must be fully qualified DID URIs (e.g. `did:example:abcd#key-1` over `#key-1`). |
| `capabilityDelegation` | Array of strings | No | String values must be fully qualified DID URIs (e.g. `did:example:abcd#key-1` over `#key-1`). |
| `service` | Array of [Services](#service-data-model) | No | - |

**Additional Notes:**
- No [JSON-LD processing](https://www.w3.org/TR/did-core/#consumption-0) is performed.
- Each [Verification Method](https://www.w3.org/TR/did-core/#verification-methods) must have at least one [Verification Relationship](https://www.w3.org/TR/did-core/#verification-relationships).

### Verification Method Data Model

Following form [this data model](https://www.w3.org/TR/did-core/#verification-methods).

| Property | JSON Representation | Required | Notes |
| ------------- | ------------------- | -------- | -------------- |
| `id` | String | Yes | Must be a fully qualified DID URI (e.g. `did:example:abcd#key-1`). |
| `type` | String | Yes | Must be a URI. |
| `controller` | String | Yes | Must be a URI. |
| `publicKeyJwk` | Object | Yes | Represents a [JWK](https://www.w3.org/TR/did-core/#bib-rfc7517). |

### Service Data Model

Following from [this data model](https://www.w3.org/TR/did-core/#services).

| Property | JSON Representation | Required | Notes |
| ----------------- | ------------------- | -------- | -------------- |
| `id` | String | Yes | Must be a fully qualified DID URI (e.g. `did:example:abcd#service-1`). |
| `type` | String | Yes | Must be a type defined in the [service registry](https://www.w3.org/TR/did-spec-registries/#service-types). |
| `serviceEndpoint` | Array of Strings | Yes | String values must be URIs. |
| `sig` | Array of Strings | No | - |
| `enc` | Array of Strings | No | - |

## DID Resolution Metadata Data Model

DID Resolution Metadata is _always optional_. This means that conformant implementations need not support the metadata, though it may be returned when interacting with DID resolvers.

Following from [this data model](https://www.w3.org/TR/did-core/#did-resolution-metadata).

| Property | JSON Representation | Required | Notes |
| ------------- | ------------------- | -------- | -------------- |
| `error` | String | No | Required if there was an error during resolution. One of the defined [error types](#did-resolution-metadata-error-types). |

### DID Resolution Metadata Error Types

Error types supported following from [this data model](https://www.w3.org/TR/did-core/#did-resolution-metadata).

| Type | Description |
| ------------- | ------------------- |
| `invalidDid` | The requested DID was not valid and resolution could not proceed. |
| `notFound` | The requested DID was not found. |
| `representationNotSupported` | The requested representation of the DID payload is not supported by the resolver. |
| `methodNotSupported` | The requested DID method is not supported by the resolver. |
| `invalidDidDocument` | The DID Document was found but did not represent a conformant document. |
| `invalidDidDocumentLength` | The size of the DID Document was not within the method's acceptable limit. |
| `internalError` | Something went wrong during DID resolution. |


## DID Document Metadata Data Model

DID Document Metadata is _always optional_. This means that conformant implementations need not support the metadata, though it may be returned when interacting with DID resolvers.

Following from [this data model](https://www.w3.org/TR/did-core/#did-document-metadata).

| Property | JSON Representation | Required | Notes |
| ---------- | -------------------- | -------- | -------------- |
| `created` | String | No | [XML Datetime](https://www.w3.org/TR/xmlschema11-2/#dateTime) value for when the DID was created. |
| `updated` | String | No | [XML Datetime](https://www.w3.org/TR/xmlschema11-2/#dateTime) value for when the DID was last updated. |
| `deactivated` | Boolean | No | Required to be `true` if the DID is deactivated. |
| `nextUpdate` | String | No | [XML Datetime](https://www.w3.org/TR/xmlschema11-2/#dateTime) value for when the next update of the DID. |
| `versionId` | String | No | Represents the version of the last update operation. |
| `nextVersionId`| String | No | Represents the version of the next update operation. |
| `equivalentId` | Array of Strings | No | A stronger form of the `alsoKnownAs` property, guaranteed by the DID method. See [this spec text](https://www.w3.org/TR/did-core/#h-note-10) for more information. |
| `canonicalId` | String | No | Similar to `equivalentId`, though always a single value, never a set. See [this spec text](https://www.w3.org/TR/did-core/#dfn-canonicalid) for more information. |
Empty file added spec/vc-11.json
Empty file.
83 changes: 83 additions & 0 deletions spec/vc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# W3C Verifiable Credentials v1.1

The VC Data Model provides optionality for many of its properties. This means they can take on multiple concrete types, for example an [`issuer` property](https://www.w3.org/TR/vc-data-model/#issuer) can either be repreesnted as a JSON string representing a URI or a JSON object that must contain an `id` property. Additionally, the data model follows an [open world](https://www.w3.org/TR/vc-data-model/#extensibility) model for extensibility via the usage of [JSON-LD](https://www.w3.org/TR/json-ld11/). As a consequence, conformant Verifiable Credentials may contain properties that are not defined by the specification itself, but by [JSON-LD Contexts](https://www.w3.org/TR/json-ld11/#the-context).

This optionality can be difficult to implement consistently across languages. As a consequence, this specification defines a strict subset of the VC Data Model v1.1 that supports the [plain JSON syntax](https://www.w3.org/TR/vc-data-model/#json), represented by the following table. As a utility JSON Schemas for [Verifiable Credentials](vc-11.json) and [Verifiable Presentations](vp-11.json) are provided to aid in the validation of conformant documents.

## Verifiable Credential Data Model

Following from [this data model](https://www.w3.org/TR/vc-data-model/#basic-concepts).

| Property | JSON Representation | Required | Notes |
| ------------- | ------------------- | -------- | -------------- |
| `@context` | Array of strings | Yes | Contexts defining the meaning of terms within the credential. Must include at least `"https://www.w3.org/2018/credentials/v1"`. |
| `id` | String | Yes | A URI representing a unique identifier for the credential. Recommended to be of form `urn:uuid:3978344f-8596-4c3a-a978-8fcaba3903c5`. |
| `type` | Array of strings | Yes | Type(s) of the credential. Must include `VerifiableCredential`. |
| `issuer` | String OR Object | Yes | Recommended to be a string; a DID representing a unique identifier for the entity that issued the credential. We also need to support the case where `issuer` is a JSON Object with an `id` propertery (following prior guidance) and a `name` property representing the Issuer's name. |
| `issuanceDate`| String | Yes | [XML Datetime](https://www.w3.org/TR/xmlschema11-2/#dateTime) value for when the credential was issued. |
| `expirationDate` | String | No | [XML Datetime](https://www.w3.org/TR/xmlschema11-2/#dateTime) value after which the credential is no longer valid. |
| `credentialSubject` | Object | Yes | Data about the subject of the credential. Can be any JSON object. |
| `credentialSubject.id` | String | Yes | A DID representing a unique identifier for whom the credential's claims are made. |
| `credentialStatus` | Object defined by [Credential Status](#credential-status) | No | Only to be used with [Status List 2021](https://www.w3.org/community/reports/credentials/CG-FINAL-vc-status-list-2021-20230102/). |
| `credentialSchema` | Object defined by [Credential Schema](#credential-schema) | No | Recommended. Only to be used with the type [`JsonSchema`](https://w3c.github.io/vc-json-schema/#jsonschema). |
| `evidence` | Array of objects | No | An array of JSON objects as per [Evidence](https://www.w3.org/TR/vc-data-model/#evidence). |

**Additional Notes:**
- The `credentialSubject` property can be any JSON object. It is recommended that this object is defined by an associated `credentialSchema`.
- No [JSON-LD processing](https://www.w3.org/TR/vc-data-model/#json-ld) is performed.
- Embedded proofs, using the `proof` property must not be present. JWTs with the `proof` property present must not be processed.
- The `type` property must always contain `VerifiableCredential` but may also contain the URI(s) of a JSON Schema, if one is used for the credential.
- We do not support multiple credential subjects.
- Verifiable Credentials must be secured as JWTs according to the [rules laid out in the specification](https://www.w3.org/TR/vc-data-model/#json-web-token).
- XML Datetime values may be represented by conforming to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) or [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formats, as they are subsets of XML Datetime.
- For the `evidence` property no further implementation is needed until we are able to specify an evidence [type](https://www.w3.org/TR/vc-data-model/#dfn-type), such as those provided by [this registry](https://w3c.github.io/vc-specs-dir/#evidence).

### Credential Status Data Model

Following from [this data model](https://www.w3.org/community/reports/credentials/CG-FINAL-vc-status-list-2021-20230102/).

**StatusList2021Entry**

| Property | JSON Representation | Required | Notes |
| --------------- | ------------------- | -------- | -------------- |
| `id` | String | Yes | A URL which uniquely identifies the status of the associated verifiable credential. |
| `type` | String | Yes | Must be set to `StatusList2021Entry`. |
| `statusPurpose` | String | Yes | Describes the type of status the object represents (e.g. `revocation` or `suspension`). |
| `statusListIndex` | String | Yes | An integer >= 0 expressed as a string that identifies the bit position of the status of the associated verifiable credential. |
| `statusListCredential` | String | Yes | A URL which uniquely identifies a verifiable credential whose type is `StatusList2021Credential`. |

**Additional Notes:**
- When representing Status List Credentials, as opposed to including a status in another VC, the Status List Credential must [follow the guidance here](https://www.w3.org/community/reports/credentials/CG-FINAL-vc-status-list-2021-20230102/#statuslist2021credential).

### Credential Schema Data Model

Following from [this data model](https://w3c.github.io/vc-json-schema/#jsonschema).

| Property | JSON Representation | Required | Notes |
| --------------- | ------------------- | -------- | -------------- |
| `id` | String | Yes | A URL which uniquely identifies the JSON Schema for the associated Verifiable Credential. |
| `type` | String | Yes | Must be set to `JsonSchema`. |

**Additional Notes:**
- Although [the referenced spec](https://w3c.github.io/vc-json-schema/) is designed for v2 of the VC Data Model, we apply it to v1.1 as a standard means to implement the `credentialSchema`.

## Verifiable Presentation Data Model

Following from [this guidance](https://www.w3.org/TR/vc-data-model/#presentations-0), which extends on the data model above.

| Property | JSON Representation | Required | Notes |
| ------------- | ------------------- | -------- | -------------- |
| `@context` | Array of strings | Yes | Contexts defining the meaning of terms within the presentation. Must include at least `"https://www.w3.org/2018/credentials/v1"`. |
| `id` | String | Yes | A URI representing a unique identifier for the presentation. Recommended to be of form `urn:uuid:3978344f-8596-4c3a-a978-8fcaba3903c5`. |
| `type` | Array of strings | Yes | Type(s) of the presentation. Must include `VerifiablePresentation`. |
| `holder` | String | Yes | A DID representing a unique identifier for the entity that created the presentation. |
| `issuanceDate`| String | Yes | [XML Datetime](https://www.w3.org/TR/xmlschema11-2/#dateTime) value for when the presentation was created. |
| `expirationDate` | String | No | [XML Datetime](https://www.w3.org/TR/xmlschema11-2/#dateTime) value after which the presentation is no longer valid. |
| `verifiableCredential` | Array of strings | Yes | An array with at least one value, containing the JWT representation of [Verifiable Credential](#verifiable-credential-data-model) objects. |

**Additional Notes:**
- No [JSON-LD processing](https://www.w3.org/TR/vc-data-model/#json-ld) is performed.
- Embedded proofs, using the `proof` property must not be present.
- The `type` property must always contain `VerifiablePresentation` but may also contain the URI(s) of a JSON Schema, if one is used for the presentation.
- Verifiable Presentations must be secured as JWTs according to the [rules laid out in the specification](https://www.w3.org/TR/vc-data-model/#json-web-token).
- XML Datetime values may be represented by conforming to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) or [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formats, as they are subsets of XML Datetime.
Empty file added spec/vp-11.json
Empty file.
24 changes: 24 additions & 0 deletions test-vectors/credentials/verify.json
Original file line number Diff line number Diff line change
@@ -40,6 +40,30 @@
"input": {
"vcJwt": "eyJraWQiOiJkaWQ6andrOmV5SnJkSGtpT2lKRlF5SXNJblZ6WlNJNkluTnBaeUlzSW1OeWRpSTZJbk5sWTNBeU5UWnJNU0lzSW10cFpDSTZJazVDWDNGc1ZVbHlNRFl0UVdsclZsWk5SbkpsY1RCc1l5MXZiVkYwZW1NMmJIZG9hR04yWjA4MmNqUWlMQ0o0SWpvaVJHUjBUamhYTm5oZk16UndRbDl1YTNoU01HVXhkRzFFYTA1dWMwcGxkWE5DUVVWUWVrdFhaMlpmV1NJc0lua2lPaUoxTTFjeE16VnBibTlrVEhGMFkwVmlPV3BPUjFNelNuTk5YM1ZHUzIxclNsTmlPRlJ5WXpsc2RWZEpJaXdpWVd4bklqb2lSVk15TlRaTEluMCMwIiwidHlwIjoiSldUIiwiYWxnIjoiRVMyNTZLIn0.eyJpc3MiOiJkaWQ6andrOmV5SnJkSGtpT2lKRlF5SXNJblZ6WlNJNkluTnBaeUlzSW1OeWRpSTZJbk5sWTNBeU5UWnJNU0lzSW10cFpDSTZJazVDWDNGc1ZVbHlNRFl0UVdsclZsWk5SbkpsY1RCc1l5MXZiVkYwZW1NMmJIZG9hR04yWjA4MmNqUWlMQ0o0SWpvaVJHUjBUamhYTm5oZk16UndRbDl1YTNoU01HVXhkRzFFYTA1dWMwcGxkWE5DUVVWUWVrdFhaMlpmV1NJc0lua2lPaUoxTTFjeE16VnBibTlrVEhGMFkwVmlPV3BPUjFNelNuTk5YM1ZHUzIxclNsTmlPRlJ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hNSIsImlzcyI6ImRpZDpqd2s6ZXlKamNuWWlPaUpGWkRJMU5URTVJaXdpYTNSNUlqb2lUMHRRSWl3aWVDSTZJakJsUVRsVk1rWnJXbVF5Y0RSSFYyaG1PVWxRVDJwWldFODJjblpvUmxsTmIzZE5abEF3YkhFM05sRWlMQ0pyYVdRaU9pSnhla1ZTYTJsU1QydzBjRFF4TjJkc1ZsUlJWa0pOYzFWNFgwRkNSMFp2U0d3M01WcE5lRmd0YWtGVklpd2lZV3huSWpvaVJXUkVVMEVpZlEiLCJzdWIiOiJkaWQ6andrOmV5SmpjbllpT2lKRlpESTFOVEU1SWl3aWEzUjVJam9pVDB0UUlpd2llQ0k2SWpCbFFUbFZNa1pyV21ReWNEUkhWMmhtT1VsUVQycFpXRTgyY25ab1JsbE5iM2ROWmxBd2JIRTNObEVpTENKcmFXUWlPaUp4ZWtWU2EybFNUMncwY0RReE4yZHNWbFJSVmtKTmMxVjRYMEZDUjBadlNHdzNNVnBOZUZndGFrRlZJaXdpWVd4bklqb2lSV1JFVTBFaWZRIiwiaWF0IjoxNzA5Njc4MzA5LCJleHAiOjI2ODc5MjA2OTB9.j1osyZOS79VagNunqwF36y_-Flvolmeu5Xo5SyzpAG4QLmo0mUauKZlQUNDzd_PZt20RSrZodbMiJE_2QKa3AA"
}
}
]
}
4 changes: 3 additions & 1 deletion test-vectors/did_dht/create.json
Original file line number Diff line number Diff line change
@@ -88,7 +88,9 @@
},
"output": {
"id": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo",
"controller": "did:example:abcd",
"controller": [
"did:example:abcd"
],
"alsoKnownAs": [
"did:example:efgh",
"did:example:ijkl"
10 changes: 4 additions & 6 deletions test-vectors/did_jwk/resolve.json
Original file line number Diff line number Diff line change
@@ -8,13 +8,12 @@
"@context": "https://w3id.org/did-resolution/v1",
"didDocument": {
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/jws-2020/v1"
"https://www.w3.org/ns/did/v1"
],
"id": "did:jwk:eyJrdHkiOiJFQyIsInVzZSI6InNpZyIsImNydiI6InNlY3AyNTZrMSIsImtpZCI6ImkzU1BSQnRKS292SEZzQmFxTTkydGk2eFFDSkxYM0U3WUNld2lIVjJDU2ciLCJ4IjoidmRyYnoyRU96dmJMRFZfLWtMNGVKdDdWSS04VEZaTm1BOVlnV3p2aGg3VSIsInkiOiJWTEZxUU1aUF9Bc3B1Y1hvV1gyLWJHWHBBTzFmUTVMbjE5VjVSQXhyZ3ZVIiwiYWxnIjoiRVMyNTZLIn0",
"verificationMethod": [
{
"type": "JsonWebKey2020",
"type": "JsonWebKey",
"id": "did:jwk:eyJrdHkiOiJFQyIsInVzZSI6InNpZyIsImNydiI6InNlY3AyNTZrMSIsImtpZCI6ImkzU1BSQnRKS292SEZzQmFxTTkydGk2eFFDSkxYM0U3WUNld2lIVjJDU2ciLCJ4IjoidmRyYnoyRU96dmJMRFZfLWtMNGVKdDdWSS04VEZaTm1BOVlnV3p2aGg3VSIsInkiOiJWTEZxUU1aUF9Bc3B1Y1hvV1gyLWJHWHBBTzFmUTVMbjE5VjVSQXhyZ3ZVIiwiYWxnIjoiRVMyNTZLIn0#0",
"controller": "did:jwk:eyJrdHkiOiJFQyIsInVzZSI6InNpZyIsImNydiI6InNlY3AyNTZrMSIsImtpZCI6ImkzU1BSQnRKS292SEZzQmFxTTkydGk2eFFDSkxYM0U3WUNld2lIVjJDU2ciLCJ4IjoidmRyYnoyRU96dmJMRFZfLWtMNGVKdDdWSS04VEZaTm1BOVlnV3p2aGg3VSIsInkiOiJWTEZxUU1aUF9Bc3B1Y1hvV1gyLWJHWHBBTzFmUTVMbjE5VjVSQXhyZ3ZVIiwiYWxnIjoiRVMyNTZLIn0",
"publicKeyJwk": {
@@ -53,13 +52,12 @@
"@context": "https://w3id.org/did-resolution/v1",
"didDocument": {
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/jws-2020/v1"
"https://www.w3.org/ns/did/v1"
],
"id": "did:jwk:eyJrdHkiOiJPS1AiLCJ1c2UiOiJzaWciLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiVnRTSFhQbEtEdzFFRW9PajVYTjNYV2hqU1BZVk52WC1lNHZqUk8weVlKQSIsIngiOiJpejcwc3ZTTHhOWmhzRHhlSlFfam5PVmJYM0tGTmtjQmNNaldqWm1YRXNBIiwiYWxnIjoiRWREU0EifQ",
"verificationMethod": [
{
"type": "JsonWebKey2020",
"type": "JsonWebKey",
"id": "did:jwk:eyJrdHkiOiJPS1AiLCJ1c2UiOiJzaWciLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiVnRTSFhQbEtEdzFFRW9PajVYTjNYV2hqU1BZVk52WC1lNHZqUk8weVlKQSIsIngiOiJpejcwc3ZTTHhOWmhzRHhlSlFfam5PVmJYM0tGTmtjQmNNaldqWm1YRXNBIiwiYWxnIjoiRWREU0EifQ#0",
"controller": "did:jwk:eyJrdHkiOiJPS1AiLCJ1c2UiOiJzaWciLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiVnRTSFhQbEtEdzFFRW9PajVYTjNYV2hqU1BZVk52WC1lNHZqUk8weVlKQSIsIngiOiJpejcwc3ZTTHhOWmhzRHhlSlFfam5PVmJYM0tGTmtjQmNNaldqWm1YRXNBIiwiYWxnIjoiRWREU0EifQ",
"publicKeyJwk": {
20 changes: 20 additions & 0 deletions test-vectors/vc_jwt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# `VC JWT` Test Vectors

This directory contains test vectors for the vc jwt functionality
[JWT](https://datatracker.ietf.org/doc/html/rfc7519).

## `verify`

Verify test vectors are detailed in a [JSON file](./verify.json).

### Input

The `input` for the sign operation is an object with the following properties:

| Property | Description |
| -------- | -------------------------------------------------------------------- |
| `jwt` | A JSON Web Token JWT object representing the jwt to verify. |

### Output

The `output` for the verify operation should not exist, it throws an error or it does not. To test validity of error can check the error message
46 changes: 46 additions & 0 deletions test-vectors/vc_jwt/decode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"description":"vc jwt decode",
"vectors":[
{
"description":"fail to decode jwt",
"input":"doodoo",
"errors":true,
"errorMessage":{
"web5-js":"Verification failed: Malformed JWT",
"web5-kt":"JWT decoding failure"
}
},
{
"description":"no claims",
"input":"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpqd2s6ZXlKamNuWWlPaUpGWkRJMU5URTVJaXdpYTNSNUlqb2lUMHRRSWl3aWVDSTZJbE5SVG5CMVprSXlSSFpYTW5OQk5EbFJWVlJMUkcwM2IzVkVRbTlWUldKNllrZzVOR1JXU0RseVYxa2lMQ0pyYVdRaU9pSjNVRWhMZEdFMlNIQlVja0pvZVRORlRXeHVSM05sZVdsNVdIcHhhMU01VldScWFrNVVZVTk2WmpZNElpd2lZV3huSWpvaVJXUkVVMEVpZlEjMCJ9.e30.U6oA2wKv20RL3yhO81AuMtNqZ3-Ak9zMkoS-r52zYTJa_udzdUiI753ljU86RCmy1mLMVYLQX2wwgZ8XwqWEDQ",
"errors":true,
"errorMessage":{
"web5-js":"Jwt payload missing vc property",
"web5-kt":"JWT contains no claims"
}
},
{
"description":"no vc claim",
"input":"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpqd2s6ZXlKamNuWWlPaUpGWkRJMU5URTVJaXdpYTNSNUlqb2lUMHRRSWl3aWVDSTZJa0ZqYlZneWVGWldaV1pUVVZFNVMxVmFUR2hUVms4dGVqWjZjWGxXWjBaUFJqRlVNM1pMT1cxT1dqUWlMQ0pyYVdRaU9pSnlkRk5RU0ZaSWFXTnBiMnhtY0c0MmRIaDVWemx1YjJKRGNVNTVWMnhWYTBWV0xWODFabEl3V1dwQklpd2lZV3huSWpvaVJXUkVVMEVpZlEjMCJ9.eyJoZWhlIjoiaGkifQ.RODqHX31e0yP2BEqhnBy8qr7u-7-ryCM4qCBHDiy5e3bDxM5RctLDAX93fZAZd0VZko4HTvgTiab99SOKBU8CQ",
"errors":true,
"errorMessage":{
"web5-js":"Jwt payload missing vc property",
"web5-kt":"The vc claim is missing"
}
},
{
"description":"vc claim wrong type",
"input":"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJbTVUVHpOalMydFJkelpCWWs5dGEyazNZa1ZPYVZGeVRXc3lkVE0xT0hSSGQxcHFaRFpSTm5CeVUyOGlmUSMwIiwidHlwIjoiSldUIn0.eyJleHAiOjM2MDEyOTM0MzEsImlzcyI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJbTVUVHpOalMydFJkelpCWWs5dGEyazNZa1ZPYVZGeVRXc3lkVE0xT0hSSGQxcHFaRFpSTm5CeVUyOGlmUSIsImp0aSI6ImFiY2QxMjMiLCJuYmYiOjE3MDkxMzM0MzEsInN1YiI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJa1JIUm1KRWVVVXpZalJHYUZwNVpXNWtlV3h2TTBwbWRsUnVaMkZWV0Y5b1ltWm9lR2szV1RSNmJYY2lmUSIsInZjIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIl0sInR5cGUiOm51bGwsImlzc3VlciI6IiIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImZpcnN0TmFtZSI6IlJhbmR5IiwibGFzdE5hbWUiOiJNY1JhbmRvIn0sImlzc3VhbmNlRGF0ZSI6IiJ9fQ.yrvOZc58oFqEXpMs6rk4E0QDLv28gjjunNFSafx0yV6tmn0nYO2btJnawPusrTcHt0tTjxB5SMUEyo6m7kWsAw",
"errors":true,
"errorMessage":{
"web5-js":"type is missing default",
"web5-kt":"Incorrect type for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3xvSyoJVtGmJBcvtmaVD7VB6V9sMFZxBC6BQ",
"errors":false
}
]
}
91 changes: 91 additions & 0 deletions test-vectors/vc_jwt/verify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"description":"vc jwt verify",
"vectors":[
{
"description":"no typ header",
"input":"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJa1JXZDFwWmFWY3lTalZETkc1cmQyRkdRV0pKVUY5MlIzTnJTamhKT1VKRk5IcE9RVGgxUkdZMVZsVWlmUSMwIn0.eyJleHAiOjI2NTUyMTM3MDQsImlzcyI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJa1JXZDFwWmFWY3lTalZETkc1cmQyRkdRV0pKVUY5MlIzTnJTamhKT1VKRk5IcE9RVGgxUkdZMVZsVWlmUSIsImp0aSI6ImFiY2QxMjMiLCJuYmYiOjE3MDkxMzM3MDQsInN1YiI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJbWRpZVhwcGNuTmthekpOVW14WVV5MWtURkU0TkZWbVRrRlZjbUp5T0hZd2FESkViblZVTUdSV1kxRWlmUSIsInZjIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIl0sInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiXSwiaXNzdWVyIjoiIiwiY3JlZGVudGlhbFN1YmplY3QiOnsiZmlyc3ROYW1lIjoiUmFuZHkiLCJsYXN0TmFtZSI6Ik1jUmFuZG8ifSwiaXNzdWFuY2VEYXRlIjoiIn19.7trsEIJxKlQhvCH3F-w4ZTessbGaCG6X_6di8sl3qTRdEk8QFyv7xvFSFXBcX4XC6i_DfWndlhj1cdEtL9B1CA",
"errors":true,
"errorMessage":{
"web5-js":"Verification failed: Expected JWT header to contain typ property set to JWT",
"web5-go":"no typ header"
}
},
{
"description":"invalid typ header",
"input":"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJbmxXTFhvMGNqZGlNMmRtZEV0U016ZEpNR3N3VVhsSk0yZHBTa0Z3ZFhsU1FtMXpZVXBSWjI0eWVUUWlmUSMwIiwidHlwIjoiS2FrYW1pbWkifQ.eyJleHAiOjI2NTUyMTM3ODMsImlzcyI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJbmxXTFhvMGNqZGlNMmRtZEV0U016ZEpNR3N3VVhsSk0yZHBTa0Z3ZFhsU1FtMXpZVXBSWjI0eWVUUWlmUSIsImp0aSI6ImFiY2QxMjMiLCJuYmYiOjE3MDkxMzM3ODMsInN1YiI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJbmRuTTFGUVJsSmplUzAxVXpaNlNqZEVWMmx4U0Vwd1RHTlJaRmhVVWsxWk1td3hhRTEyWm1reFVXTWlmUSIsInZjIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIl0sInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiXSwiaXNzdWVyIjoiIiwiY3JlZGVudGlhbFN1YmplY3QiOnsiZmlyc3ROYW1lIjoiUmFuZHkiLCJsYXN0TmFtZSI6Ik1jUmFuZG8ifSwiaXNzdWFuY2VEYXRlIjoiIn19.fE58Vtqg5-oOQKvRCiJHCspZaqmGOtEIlUTf8TqWpviWGndpZWj1XofcUfcNFLWTHnk6H-2ku9FA7x_t4ymgAA",
"errors":true,
"errorMessage":{
"web5-js":"Verification failed: Expected JWT header to contain typ property set to JWT",
"web5-go":"invalid typ header"
}
},
{
"description":"empty issuer",
"input":"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa2t3V215WHhGRkI3VlczWWNSYzQ0NTlZSFZkZ2RCTXNiTmlzWFYxS2lyTUtZI3o2TWtrd1dteVh4RkZCN1ZXM1ljUmM0NDU5WUhWZGdkQk1zYk5pc1hWMUtpck1LWSJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiVEJEZXZlbG9wZXJDcmVkZW50aWFsIl0sImlkIjoidXJuOnV1aWQ6MWEzNWJhZjctOTJlMC00YjVkLTkxYmYtMDAyMjU5Y2RlZmY0IiwiaXNzdWFuY2VEYXRlIjoiMjAyNC0wMi0yOVQxODo0MjoxNloiLCJjcmVkZW50aWFsU3ViamVjdCI6eyJpZCI6ImRpZDprZXk6ejZNa29ZOFNyUnNOZ2ZncXdIRkN5WVZmR0ZVVFNZUmR4WkxmbVlLVU1yOGFHNXJFIiwidXNlcm5hbWUiOiJuaXRybyJ9fSwibmJmIjoxNzA5MjMyMTM2LCJqdGkiOiJ1cm46dXVpZDoxYTM1YmFmNy05MmUwLTRiNWQtOTFiZi0wMDIyNTljZGVmZjQiLCJpc3MiOiJkaWQ6a2V5Ono2TWtrd1dteVh4RkZCN1ZXM1ljUmM0NDU5WUhWZGdkQk1zYk5pc1hWMUtpck1LWSIsInN1YiI6ImRpZDprZXk6ejZNa29ZOFNyUnNOZ2ZncXdIRkN5WVZmR0ZVVFNZUmR4WkxmbVlLVU1yOGFHNXJFIiwiaWF0IjoxNzA5MjMyMTM2LCJleHAiOjI2OTc4MjE3NjN9.H6rJDO6iVN0KBsKeiDo6BP5heKgBWghJ36G0EfrNNd6w4k1DGG8cgJQanUZ4tIrRSFtNuTEzSbDx_ZDDY5r0DQ",
"errors":true,
"errorMessage":{
"web5-js":"Verification failed: iss claim does not match expected issuer",
"web5-go":"no id"
}
},
{
"description":"issuance date in future",
"input":"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa3B0anZzanphOTZUejNFeHJYYVQyYkZSeXZUZTlZYXAyVUo1Tk5EdjVuRzlNI3o2TWtwdGp2c2p6YTk2VHozRXhyWGFUMmJGUnl2VGU5WWFwMlVKNU5ORHY1bkc5TSJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiVEJEZXZlbG9wZXJDcmVkZW50aWFsIl0sImlkIjoidXJuOnV1aWQ6NzdkYzI1YjgtOGM5Yi00M2UyLTkyN2UtMWVkNzhhNjVlNmMwIiwiaXNzdWVyIjoiZGlkOmtleTp6Nk1rcHRqdnNqemE5NlR6M0V4clhhVDJiRlJ5dlRlOVlhcDJVSjVOTkR2NW5HOU0iLCJpc3N1YW5jZURhdGUiOiIyMTA5LTA4LTI3VDEzOjM3OjIzWiIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmtleTp6Nk1rbjU3RTZpR1BLSGl5TXZYc21vcnBtbXRSTXRRS0RiTVRrVlVUcTdSTTZDa2giLCJ1c2VybmFtZSI6Im5pdHJvIn19LCJuYmYiOjQ0MDcwNTM4NDMsImp0aSI6InVybjp1dWlkOjc3ZGMyNWI4LThjOWItNDNlMi05MjdlLTFlZDc4YTY1ZTZjMCIsImlzcyI6ImRpZDprZXk6ejZNa3B0anZzanphOTZUejNFeHJYYVQyYkZSeXZUZTlZYXAyVUo1Tk5EdjVuRzlNIiwic3ViIjoiZGlkOmtleTp6Nk1rbjU3RTZpR1BLSGl5TXZYc21vcnBtbXRSTXRRS0RiTVRrVlVUcTdSTTZDa2giLCJpYXQiOjQ0MDcwNTM4NDMsImV4cCI6MjY5NzgyMTc2M30.DRPjURxt0OCzOeXd9NZx--y_5AGQ3dzX0dspN-oFbreiytLZkmnHz6C2qUfaZV6QG7dzk15NQQhZZ8zZqSYeAg",
"errors":true,
"errorMessage":{
"web5-js":"Verification failed: nbf claim is in the future",
"web5-go":"issuance date in future"
}
},
{
"description":"no context",
"input":"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa3RKTFpKU2JVeW5hY2gyZzR6em5LM1plVlZEZDlMc1Q1cWpCcm9tZ0M0TkdFI3o2TWt0SkxaSlNiVXluYWNoMmc0enpuSzNaZVZWRGQ5THNUNXFqQnJvbWdDNE5HRSJ9.eyJ2YyI6eyJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiVEJEZXZlbG9wZXJDcmVkZW50aWFsIl0sImlkIjoidXJuOnV1aWQ6MDVlYzg3MGQtMDYzOC00ZjdjLTlkMGMtMmM1ODJiNzM4NzlkIiwiaXNzdWVyIjoiZGlkOmtleTp6Nk1rdEpMWkpTYlV5bmFjaDJnNHp6bkszWmVWVkRkOUxzVDVxakJyb21nQzROR0UiLCJpc3N1YW5jZURhdGUiOiIyMDI0LTAyLTI5VDE4OjM5OjMzWiIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmtleTp6Nk1rbkFGWkt1aG8yTkhTYTN1MTNqZGRZdDdpQTdFc2FaakxINFBhS3FuR1BVcHYiLCJ1c2VybmFtZSI6Im5pdHJvIn19LCJuYmYiOjE3MDkyMzE5NzMsImp0aSI6InVybjp1dWlkOjA1ZWM4NzBkLTA2MzgtNGY3Yy05ZDBjLTJjNTgyYjczODc5ZCIsImlzcyI6ImRpZDprZXk6ejZNa3RKTFpKU2JVeW5hY2gyZzR6em5LM1plVlZEZDlMc1Q1cWpCcm9tZ0M0TkdFIiwic3ViIjoiZGlkOmtleTp6Nk1rbkFGWkt1aG8yTkhTYTN1MTNqZGRZdDdpQTdFc2FaakxINFBhS3FuR1BVcHYiLCJpYXQiOjE3MDkyMzE5NzMsImV4cCI6MjY5NzgyMTc2M30.uegrsxyLsteVNX4Adjbsrya-IDiSMYTDQYXnBs0tbidbirKip_IYodCU__atyuJxdq6APtGiaY1hzoy38MHlAA",
"errors":true,
"errorMessage":{
"web5-js":"@context is missing default context",
"web5-go":"no context"
}
},
{
"description":"missing base context",
"input":"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa3VqYVdBdFpxSk5pdnFzaWpNMVNaaWRZQkdLazI4ZFVaRW5BbnNzVDdoaDdhI3o2TWt1amFXQXRacUpOaXZxc2lqTTFTWmlkWUJHS2syOGRVWkVuQW5zc1Q3aGg3YSJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJ3cm9uZy1jb250ZXh0Il0sInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJUQkRldmVsb3BlckNyZWRlbnRpYWwiXSwiaWQiOiJ1cm46dXVpZDpiMWRiMTQwMC00YTE2LTQwN2QtOGMxOC02MWNlODUwZTQzMDciLCJpc3N1ZXIiOiJkaWQ6a2V5Ono2TWt1amFXQXRacUpOaXZxc2lqTTFTWmlkWUJHS2syOGRVWkVuQW5zc1Q3aGg3YSIsImlzc3VhbmNlRGF0ZSI6IjIwMjQtMDItMjlUMTg6Mzk6MDdaIiwiY3JlZGVudGlhbFN1YmplY3QiOnsiaWQiOiJkaWQ6a2V5Ono2TWtvUkVnczVIbXk1Nmo3cDhZb0J1RlhFUzJaZXB4a2JpQWExUGRDUURvQjE3aCIsInVzZXJuYW1lIjoibml0cm8ifX0sIm5iZiI6MTcwOTIzMTk0NywianRpIjoidXJuOnV1aWQ6YjFkYjE0MDAtNGExNi00MDdkLThjMTgtNjFjZTg1MGU0MzA3IiwiaXNzIjoiZGlkOmtleTp6Nk1rdWphV0F0WnFKTml2cXNpak0xU1ppZFlCR0trMjhkVVpFbkFuc3NUN2hoN2EiLCJzdWIiOiJkaWQ6a2V5Ono2TWtvUkVnczVIbXk1Nmo3cDhZb0J1RlhFUzJaZXB4a2JpQWExUGRDUURvQjE3aCIsImlhdCI6MTcwOTIzMTk0NywiZXhwIjoyNjk3ODIxNzYzfQ.kDbWpA-lEw8vyNmN_6EOq5QQGN3aDnnoWA6KvaOdcoZsusZCvPwWtf03WkXSDq4hv-g0AxBafwG19gsToTLXAg",
"errors":true,
"errorMessage":{
"web5-js":"@context is missing default context",
"web5-go":"missing base context"
}
},
{
"description":"no type",
"input":"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa2tmS0M2Z0RGdE5MR21KTlNkc2ZEQmdHdjUyekdkYmRCMk1GcVVvcXZ3ZjRqI3o2TWtrZktDNmdERnROTEdtSk5TZHNmREJnR3Y1MnpHZGJkQjJNRnFVb3F2d2Y0aiJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJpZCI6InVybjp1dWlkOjg1NmJiNGQ2LTEwODItNGFmNS05MmQ4LWFiMjgyYmRkNmY0ZiIsImlzc3VlciI6ImRpZDprZXk6ejZNa2tmS0M2Z0RGdE5MR21KTlNkc2ZEQmdHdjUyekdkYmRCMk1GcVVvcXZ3ZjRqIiwiaXNzdWFuY2VEYXRlIjoiMjAyNC0wMi0yOVQxODozODozMVoiLCJjcmVkZW50aWFsU3ViamVjdCI6eyJpZCI6ImRpZDprZXk6ejZNa3Z5dzNZc1poaVlFSjdna293NHJWYXB3V1VrNVFCVUNMTjFwR1prWVZHZjdKIiwidXNlcm5hbWUiOiJuaXRybyJ9fSwibmJmIjoxNzA5MjMxOTExLCJqdGkiOiJ1cm46dXVpZDo4NTZiYjRkNi0xMDgyLTRhZjUtOTJkOC1hYjI4MmJkZDZmNGYiLCJpc3MiOiJkaWQ6a2V5Ono2TWtrZktDNmdERnROTEdtSk5TZHNmREJnR3Y1MnpHZGJkQjJNRnFVb3F2d2Y0aiIsInN1YiI6ImRpZDprZXk6ejZNa3Z5dzNZc1poaVlFSjdna293NHJWYXB3V1VrNVFCVUNMTjFwR1prWVZHZjdKIiwiaWF0IjoxNzA5MjMxOTExLCJleHAiOjI2OTc4MjE3NjN9.w5knx7h_kVoMZCyp5rXQ141MzbZ6Dt4Q_QofHfmN-zRnACnWAw3L2t9zs8w0d-igBagZaSM29UUNS6d_W4J7BQ",
"errors":true,
"errorMessage":{
"web5-js":"type is missing default",
"web5-go":"no type"
}
},
{
"description":"missing base type",
"input":"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa20zYVlNam52VUhXRDliVnplUFk2VFJuM1lpQmV6NWJNQWE0OVR1dk5udGQ0I3o2TWttM2FZTWpudlVIV0Q5YlZ6ZVBZNlRSbjNZaUJlejViTUFhNDlUdXZObnRkNCJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlRCRGV2ZWxvcGVyQ3JlZGVudGlhbCJdLCJpZCI6InVybjp1dWlkOmVlNjQ4MmY0LTAxOTMtNDIzZC1hODIzLTVmZTU5MjQxMThmZCIsImlzc3VlciI6ImRpZDprZXk6ejZNa20zYVlNam52VUhXRDliVnplUFk2VFJuM1lpQmV6NWJNQWE0OVR1dk5udGQ0IiwiaXNzdWFuY2VEYXRlIjoiMjAyNC0wMi0yOVQxODozNzo0M1oiLCJjcmVkZW50aWFsU3ViamVjdCI6eyJpZCI6ImRpZDprZXk6ejZNa21GMnlVdmF6NWRHdFM5d1g5YzQya1o5ZlFpTlpkTXQ5azNIVUs3WGloS3hhIiwidXNlcm5hbWUiOiJuaXRybyJ9fSwibmJmIjoxNzA5MjMxODYzLCJqdGkiOiJ1cm46dXVpZDplZTY0ODJmNC0wMTkzLTQyM2QtYTgyMy01ZmU1OTI0MTE4ZmQiLCJpc3MiOiJkaWQ6a2V5Ono2TWttM2FZTWpudlVIV0Q5YlZ6ZVBZNlRSbjNZaUJlejViTUFhNDlUdXZObnRkNCIsInN1YiI6ImRpZDprZXk6ejZNa21GMnlVdmF6NWRHdFM5d1g5YzQya1o5ZlFpTlpkTXQ5azNIVUs3WGloS3hhIiwiaWF0IjoxNzA5MjMxODYzLCJleHAiOjI2OTc4MjE3NjN9.FutMFx9sCEJWTIXAqwkEpoZ5mMtH6VdkQ0TQ75UJlF-Yz3EVE_wU0sxXyrQwNkyOOu5BCAjGCwKrtAY3b3DqDg",
"errors":true,
"errorMessage":{
"web5-js":"type is missing default",
"web5-go":"missing base type"
}
},
{
"description":"jti does not match id",
"input":"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa2Y4YjFSVTdhajM5dFozSnVCUXQ3QTJxdDY2NWRFNGdpbktyUTVuaFhOeTVEI3o2TWtmOGIxUlU3YWozOXRaM0p1QlF0N0EycXQ2NjVkRTRnaW5LclE1bmhYTnk1RCJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiVEJEZXZlbG9wZXJDcmVkZW50aWFsIl0sImlkIjoidXJuOnV1aWQ6MzhmODI2N2ItZGIxMC00ZmRjLTlkNzAtZGNmYTU2ZDFlZGQwIiwiaXNzdWVyIjoiZGlkOmtleTp6Nk1rZjhiMVJVN2FqMzl0WjNKdUJRdDdBMnF0NjY1ZEU0Z2luS3JRNW5oWE55NUQiLCJpc3N1YW5jZURhdGUiOiIyMDI0LTAyLTI5VDE4OjA4OjM1WiIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmtleTp6Nk1rbnpHcEhINkU5U3N5ZG9YbVJHb2ljVFZlOUpzZVo3c21KeloxVXhrQW5QTnciLCJ1c2VybmFtZSI6Im5pdHJvIn19LCJuYmYiOjE3MDkyMzAxMTUsImp0aSI6InVybjp1dWlkOm90aGVyLWlkIiwiaXNzIjoiZGlkOmtleTp6Nk1rZjhiMVJVN2FqMzl0WjNKdUJRdDdBMnF0NjY1ZEU0Z2luS3JRNW5oWE55NUQiLCJzdWIiOiJkaWQ6a2V5Ono2TWtuekdwSEg2RTlTc3lkb1htUkdvaWNUVmU5SnNlWjdzbUp6WjFVeGtBblBOdyJ9.QmOD0QKiszYgda6mE73YDBVX9CIat1OBS10f3p24ao34-ml08tiiFPNQGMdHM3zUMN7Ya3ZdLu9Ytosx9advAA",
"errors":true,
"errorMessage":{
"web5-js":"Verification failed: jti claim does not match id",
"web5-go":"missing base type"
}
},
{
"description":"valid jwt",
"input":"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa21rWnhpQlp4ZEN3S3RjRDFobnBLdllvdThIcFY4SjJ4MUwxeTlIZUduUEpKI3o2TWtta1p4aUJaeGRDd0t0Y0QxaG5wS3ZZb3U4SHBWOEoyeDFMMXk5SGVHblBKSiJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiVEJEZXZlbG9wZXJDcmVkZW50aWFsIl0sImlkIjoidXJuOnV1aWQ6MmZjZjRkMzQtZTc5Ny00MWJlLWFiZTctYTAxZGY5MjgzNzQ4IiwiaXNzdWVyIjoiZGlkOmtleTp6Nk1rbWtaeGlCWnhkQ3dLdGNEMWhucEt2WW91OEhwVjhKMngxTDF5OUhlR25QSkoiLCJpc3N1YW5jZURhdGUiOiIyMDI0LTAyLTI5VDE4OjE2OjE0WiIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmtleTp6Nk1rdXFHVDI5Q0x0WXdlZWZyTmVVOFk4cnZ6bXBpTWk3d3AyTWlCQW9SQmtiZmsiLCJ1c2VybmFtZSI6Im5pdHJvIn19LCJuYmYiOjE3MDkyMzA1NzQsImp0aSI6InVybjp1dWlkOjJmY2Y0ZDM0LWU3OTctNDFiZS1hYmU3LWEwMWRmOTI4Mzc0OCIsImlzcyI6ImRpZDprZXk6ejZNa21rWnhpQlp4ZEN3S3RjRDFobnBLdllvdThIcFY4SjJ4MUwxeTlIZUduUEpKIiwic3ViIjoiZGlkOmtleTp6Nk1rdXFHVDI5Q0x0WXdlZWZyTmVVOFk4cnZ6bXBpTWk3d3AyTWlCQW9SQmtiZmsiLCJpYXQiOjE3MDkyMzA1NzQsImV4cCI6MjY5NzgyMTc2M30.fKHojEqulH8uHXxNuXzn-CtwIjjFHg-wGoH9TcCDebLfZrzVoOGVRouWXZogMxWhHIPcYXY5gyGpzJ6cbYEXBQ",
"errors":false
}
]
}
7 changes: 7 additions & 0 deletions test-vectors/vectors.schema.json
Original file line number Diff line number Diff line change
@@ -30,6 +30,13 @@
"type": "boolean",
"default": false,
"description": "Indicates whether the test vector is expected to produce an error. Defaults to false if not present."
},
"errorMessage": {
"type": "object",
"description": "A dictionary object that maps the sdk error message to the expected error message.",
"additionalProperties": {
"type": "string"
}
}
},
"additionalProperties": false

0 comments on commit 7b292cb

Please sign in to comment.