This repository contains the W3C Verifiable Claims Working Group test suite. Any conforming implementation MUST pass all tests in the test suite.
There are multiple test suites, each of which is detailed below.
You can review the current draft implementation report.
This test suite will check any application that generates Verifiable Credential Data Model documents to ensure conformance with the specification.
npm install
cp config.json.example config.json
- Modify
config.json
for your run. npm test
The following are the command line parameters that JWT generators have to expect (in addition to the filename/path):
Cmd Line Parameter | Description |
---|---|
--jwt <base64-encoded-keys> |
Generators can choose between RS256 and ES256K private keys to generate JWS for verifiable credentials and presentations. contains a base64encoded JSON object containing es256kPrivateKeyJwk and rs256PrivateKeyJwk. |
--jwt-aud <aud> |
Generators have to use <aud> as the aud attribute in all JWTs |
--jwt-no-jws |
Generators have to suppress the JWS although keys are present |
--jwt-presentation |
Generators have to generate a verifiable presentation |
--jwt-decode |
Generators have to generate a credential from a JWT verifiable credential. The input file will be a JWT instead of a JSON-LD file. |
JWT tests belong to any of the following three categories:
- generate (encode) a JWT W3C verifiable credential from a JSON-LD W3C credential (.jsonld file). The following parameters are used:
Cmd Line Parameter | Optional |
---|---|
--jwt <base64-encoded-keys> |
no |
--jwt-aud <aud> |
no |
--jwt-no-jws |
yes |
- generate (encode) a JWT W3C verifiable presentation from a JSON-LD W3C credential (.jsonld file). The generator will have to create a JWT verifiable credential first and then put the verifiable credential into the JWT verifiable presentation (as shown in Example 31). The following command line parameter are used:
Cmd Line Parameter | Optional |
---|---|
--jwt <base64-encoded-keys> |
no |
--jwt-aud <aud> |
no |
--jwt-presentation |
yes |
- generate (decode) a JSON-LD W3C credential from a JWT W3C verifiable credential (.jwt).
Cmd Line Parameter | Optional |
---|---|
--jwt-decode |
no |
NOTE: the command line parameters will be provided by the JWT tests based on the configuration in config.json
.
See config.json.example
for all possible JWT specific config parameters, and see config.json.jwt.example
for an example
JWT configuration.
npm install
cp config.json.example config.json
- Modify
config.json
for your run. npm run report
mv implementations/report.json implementations/{YOUR_IMPLEMENTATION}-report.json
git add implementations/{YOUR_IMPLEMENTATION}-report.json
- Submit a pull request for your implementation.
cd implementations/ && node generate.js
You may contribute to this test suite by submitting pull requests here:
https://github.com/w3c/vc-test-suite/
New BSD License (3-clause) © Digital Bazaar