From a4b556e5aff4bfe23927682964d04a614ac64485 Mon Sep 17 00:00:00 2001 From: Andres Uribe Gonzalez Date: Mon, 7 Aug 2023 13:55:13 -0400 Subject: [PATCH 1/4] Added validation examples. --- index.html | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/index.html b/index.html index 9e520e9..54a69d5 100644 --- a/index.html +++ b/index.html @@ -564,6 +564,118 @@

Evaluation

  • Indeterminate – The credential could not be validated. Implementers MUST return this outcome when they encounter a schema whose version they do not support.
  • +

    + Examples for the Success and Failure possible outcomes are provided below. +

    +
    +          {
    +            "$id": "https://example.com/schemas/email.json",
    +            "$schema": "https://json-schema.org/draft/2020-12/schema",
    +            "name": "EmailCredential",
    +            "description": "EmailCredential using JsonSchema",
    +            "type": "object",
    +            "properties": {
    +              "credentialSubject": {
    +                "type": "object",
    +                "properties": {
    +                  "emailAddress": {
    +                    "type": "string",
    +                    "format": "email"
    +                  }
    +                },
    +                "required": [
    +                  "emailAddress"
    +                ]
    +              }
    +            }
    +          }
    +          
    +
    +          {
    +            "@context": [
    +              "https://www.w3.org/ns/credentials/v2",
    +              "https://www.w3.org/ns/credentials/examples/v2"
    +            ],
    +            "id": "https://example.com/credentials/3732",
    +            "type": ["VerifiableCredential", "EmailCredential"],
    +            "issuer": "https://example.com/issuers/14",
    +            "issuanceDate": "2010-01-01T19:23:24Z",
    +            "credentialSubject": {
    +              "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
    +              "emailAddress": "subject@example.com"
    +            },
    +            "credentialSchema": {
    +              "id": "https://example.com/schemas/email.json",
    +              "type": "JsonSchema",
    +            }
    +          }
    +        
    +
    +          {
    +            "@context": [
    +              "https://www.w3.org/ns/credentials/v2",
    +              "https://www.w3.org/ns/credentials/examples/v2"
    +            ],
    +            "id": "https://example.com/credentials/3732",
    +            "type": ["VerifiableCredential", "EmailCredential"],
    +            "issuer": "https://example.com/issuers/14",
    +            "issuanceDate": "2010-01-01T19:23:24Z",
    +            "credentialSubject": {
    +              "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
    +              "emailAddress": "not an email"
    +            },
    +            "credentialSchema": {
    +              "id": "https://example.com/schemas/email.json",
    +              "type": "JsonSchema",
    +            }
    +          }
    +        
    +

    + Assuming that the implementer does not support [[JSON-SCHEMA-2019-09]], an example of Indeterminate evaluation is provided below. +

    +
    +          {
    +            "$id": "https://example.com/schemas/email.json",
    +            "$schema": "https://json-schema.org/draft/2019-09/schema",
    +            "name": "EmailCredential",
    +            "description": "EmailCredential using JsonSchema",
    +            "type": "object",
    +            "properties": {
    +              "credentialSubject": {
    +                "type": "object",
    +                "properties": {
    +                  "emailAddress": {
    +                    "type": "string",
    +                    "format": "email"
    +                  }
    +                },
    +                "required": [
    +                  "emailAddress"
    +                ]
    +              }
    +            }
    +          }
    +          
    +
    +          {
    +            "@context": [
    +              "https://www.w3.org/ns/credentials/v2",
    +              "https://www.w3.org/ns/credentials/examples/v2"
    +            ],
    +            "id": "https://example.com/credentials/3732",
    +            "type": ["VerifiableCredential", "EmailCredential"],
    +            "issuer": "https://example.com/issuers/14",
    +            "issuanceDate": "2010-01-01T19:23:24Z",
    +            "credentialSubject": {
    +              "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
    +              "emailAddress": "not an email"
    +            },
    +            "credentialSchema": {
    +              "id": "https://example.com/schemas/email.json",
    +              "type": "JsonSchema",
    +            }
    +          }
    +          
    From db684aa9d3d55113018231bb47263361290a5da7 Mon Sep 17 00:00:00 2001 From: Andres Uribe Gonzalez Date: Mon, 7 Aug 2023 17:36:36 -0400 Subject: [PATCH 2/4] Using the vc-jwt respec plugin --- index.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 54a69d5..0269a29 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,7 @@ class="remove" defer > + - +