### Example 13: Verifiable Credential (Indeterminate) - Partial Source: https://www.w3.org/TR/vc-json-schema A Verifiable Credential example that is incomplete in the source, showing only the beginning of the JSON structure. It is part of Example 13 for the Indeterminate validation result. ```json { "@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"], ``` -------------------------------- ### Mermaid Diagram of Example Credential Source: https://www.w3.org/TR/vc-json-schema Mermaid diagram representing the structure of the example verifiable credential, showing the relationships between properties and values. ```mermaid graph LR 0("VerifiableCredential") 1{{"id"}} 2("https://example.com/credentials/3732") 3(("type")) 4("EmailCredential") 5("issuer") 6("https://example.com/issuers/14") 7("issuanceDate") 8("2010-01-01T19:23:24Z") 9("credentialSubject") 10{{"id"}} 11("did:example:ebfeb1f712ebc6f1c276e12ec21") 12("emailAddress") 13("subject@example.com") 14("credentialSchema") 15{{"id"}} 16("https://example.com/schemas/email.json") 17(("type")) 18("JsonSchema") 0 --- 1 1 --- 2 0 --- 3 3 --- 4 0 --- 5 5 --- 6 0 --- 7 7 --- 8 0 --- 9 9 --- 10 10 --- 11 9 --- 12 12 --- 13 0 --- 14 14 --- 15 15 --- 16 14 --- 17 17 --- 18 ``` -------------------------------- ### Mermaid Graph of Failure Example Source: https://www.w3.org/TR/vc-json-schema A Mermaid graph visualizing the structure of the failing Verifiable Credential from Example 11, showing the credential graph with nodes for each property and value. ```mermaid graph LR 122("VerifiableCredential") 123{{"id"}} 124("https://example.com/credentials/3732") 125(("type")) 126("EmailCredential") 127("issuer") 128("https://example.com/issuers/14") 129("issuanceDate") 130("2010-01-01T19:23:24Z") 131("credentialSubject") 132{{"id"}} 133("did:example:ebfeb1f712ebc6f1c276e12ec21") 134("emailAddress") 135("not an email") 136("credentialSchema") 137{{"id"}} 138("https://example.com/schemas/email.json") 139(("type")) 140("JsonSchema") 122 --- 123 123 --- 124 122 --- 125 125 --- 126 122 --- 127 127 --- 128 122 --- 129 129 --- 130 122 --- 131 131 --- 132 132 --- 133 131 --- 134 134 --- 135 122 --- 136 136 --- 137 137 --- 138 136 --- 139 139 --- 140 ``` -------------------------------- ### Example JsonSchema Credential Source: https://www.w3.org/TR/vc-json-schema Example of a verifiable credential that uses the credentialSchema property with type JsonSchema. The id of the schema is dereferenced to obtain the JSON Schema document. ```json { "@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" } } ``` -------------------------------- ### YAML JSON Schema for Email Credential (Example 7) Source: https://www.w3.org/TR/vc-json-schema Example 7 shows a YAML representation of a JSON Schema for an email credential. It uses the Draft 2020-12 $schema URI and includes a JSON example embedded in the YAML. YAML representations are only allowed for credential schemas whose type is JsonSchema. ```yaml --- "$id": https://example.com/schemas/email.json "$schema": https://json-schema.org/draft/2020-12/schema title: Email Credential Schema description: Email Credential JSON Schema using YAML type: object properties: credentialSubject: type: object properties: emailAddress: type: string format: email required: - emailAddress example: |- { "$id": "https://example.com/schemas/email.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "EmailCredential", "description": "Email Credential JSON Schema", "type": "object", "properties": { "credentialSubject": { "type": "object", "properties": { "emailAddress": { "type": "string", "format": "email" } }, "required": ["emailAddress"] } } } ``` -------------------------------- ### Example Name Credential Schema Source: https://www.w3.org/TR/vc-json-schema Example schema capturing a human name. Note that additionalProperties is set to false, which the specification advises against to avoid excluding properties like id from validation. ```json { "$id": "name-schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Name schema", "description": "A schema capturing a human name", "type": "object", "properties": { "credentialSubject": { "type": "object", "properties": { "name": { "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "additionalProperties": false }, } } } } } ``` -------------------------------- ### Example JsonSchemaCredential Source: https://www.w3.org/TR/vc-json-schema Example of a verifiable credential that uses the credentialSchema property with type JsonSchemaCredential. The credentialSubject contains an emailAddress property. ```json { "@context": [ "https://www.w3.org/ns/credentials/v2", "https://www.w3.org/ns/credentials/examples/v2" ], "id": "https://example.com/credentials/3733", "type": ["VerifiableCredential", "ExampleEmailCredential"], "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/credentials/3734", "type": "JsonSchemaCredential" } } ``` -------------------------------- ### JsonSchemaCredential Example Source: https://www.w3.org/TR/vc-json-schema Example of a verifiable credential with a JsonSchema credential schema. The credentialSubject contains an emailAddress that is not a valid email, and the schema is referenced by URL. ```json { "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" } } ``` -------------------------------- ### Decoded JWT of Example Credential Source: https://www.w3.org/TR/vc-json-schema Decoded JWT representation of the example credential, showing the protected header, claimset, and compact encoded token. The header uses ES384 algorithm. ```text ---------------- Decoded Protected Header ---------------- { "alg": "ES384" } ---------------- Decoded Protected Claimset ---------------- { "@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" } } ---------------- Compact Encoded JSON Web Token ---------------- eyJhbGciOiJFUzM4NCJ9.eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvdjIiLCJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvZXhhbXBsZXMvdjIiXSwiaWQiOiJodHRwczovL2V4YW1wbGUuY29tL2NyZWRlbnRpYWxzLzM3MzIiLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiRW1haWxDcmVkZW50aWFsIl0sImlzc3VlciI6Imh0dHBzOi8vZXhhbXBsZS5jb20vaXNzdWVycy8xNCIsImlzc3VhbmNlRGF0ZSI6IjIwMTAtMDEtMDFUMTk6MjM6MjRaIiwiY3JlZGVudGlhbFN1YmplY3QiOnsiaWQiOiJkaWQ6ZXhhbXBsZTplYmZlYjFmNzEyZWJjNmYxYzI3NmUxMmVjMjEiLCJlbWFpbEFkZHJlc3MiOiJzdWJqZWN0QGV4YW1wbGUuY29tIn0sImNyZWRlbnRpYWxTY2hlbWEiOnsiaWQiOiJodHRwczovL2V4YW1wbGUuY29tL3NjaGVtYXMvZW1haWwuanNvbiIsInR5cGUiOiJKc29uU2NoZW1hIn19.jrj-5s5y89zMb03yzanSNVi_8IyzGBB0aPyv_HEYgMHJicJaoNw1zwlaOiUD3Hf8Tuc_EOsSAeHSibhD6zlMtj97wxBw1cQ5axG7GPjIk420gmhI5AXNuFsaVdG15Cv_ ``` -------------------------------- ### Example Verifiable Credential JsonSchema with Integrity Information Source: https://www.w3.org/TR/vc-json-schema Example Verifiable Credential with JsonSchema type and digestSRI integrity information. The credentialSchema value includes the digestSRI property for integrity validation. This example is used to illustrate how to annotate a credential schema with integrity information. ```json { "@context": [ "https://www.w3.org/ns/credentials/v2", "https://www.w3.org/ns/credentials/examples/v2" ], "id": "https://example.com/credentials/3733", "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", "digestSRI": "sha384-dNwyy/Zs/YjPor8aoOgnaCqb+PH24QcNFxbxM1XoBOxdbgnpQcVaGYH8QunXww2U" } } ``` -------------------------------- ### Mermaid Diagram of Example 10 Credential Source: https://www.w3.org/TR/vc-json-schema A Mermaid diagram visualizing the structure of the Verifiable Credential from Example 10, showing the relationships between the credential, its properties, and the credential schema. ```mermaid graph LR 103("VerifiableCredential") 104{{"id"}} 105("https://example.com/credentials/3732") 106(("type")) 107("EmailCredential") 108("issuer") 109("https://example.com/issuers/14") 110("issuanceDate") 111("2010-01-01T19:23:24Z") 112("credentialSubject") 113{{"id"}} 114("did:example:ebfeb1f712ebc6f1c276e12ec21") 115("emailAddress") 116("subject@example.com") 117("credentialSchema") 118{{"id"}} 119("https://example.com/schemas/email.json") 120(("type")) 121("JsonSchema") 103 --- 104 104 --- 105 103 --- 106 106 --- 107 103 --- 108 108 --- 109 103 --- 110 110 --- 111 103 --- 112 112 --- 113 113 --- 114 112 --- 115 115 --- 116 103 --- 117 117 --- 118 118 --- 119 117 --- 120 120 --- 121 ``` -------------------------------- ### Mermaid Graph of JsonSchemaCredential Example Source: https://www.w3.org/TR/vc-json-schema Mermaid graph representation of the JsonSchemaCredential example, showing the structure and relationships of the verifiable credential and its embedded JSON Schema. Useful for visualizing the data model. ```mermaid graph LR 38("VerifiableCredential") 39{{"id"}} 40("https://example.com/credentials/3734") 41(("type")) 42("JsonSchemaCredential") 43("issuer") 44("https://example.com/issuers/14") 45("issuanceDate") 46("2010-01-01T19:23:24Z") 47("credentialSchema") 48{{"id"}} 49("https://www.w3.org/ns/credentials/json-schema/v2.json") 50(("type")) 51("JsonSchema") 52("digestSRI") 53("sha384-S57yQDg1MTzF56Oi9DbSQ14u7jBy0RDdx0YbeV7shwhCS88G8SCXeFq82PafhCrW") 54("credentialSubject") 55{{"id"}} 56("https://example.com/schemas/email-credential-schema.json") 57(("type")) 58("JsonSchema") 59("jsonSchema") 60("$id") 61("https://example.com/schemas/email-credential-schema.json") 62("$schema") 63("https://json-schema.org/draft/2020-12/schema") 64("title") 65("EmailCredential") 66("description") 67("EmailCredential using JsonSchemaCredential") 68(("type")) 69("object") 70("properties") 71("credentialSubject") 72(("type")) 73("object") 74("properties") 75("emailAddress") 76(("type")) 77("string") 78("format") 79("email") 80("required") 81("emailAddress") 38 --- 39 39 --- 40 38 --- 41 41 --- 42 38 --- 43 43 --- 44 38 --- 45 45 --- 46 38 --- 47 47 --- 48 48 --- 49 47 --- 50 50 --- 51 47 --- 52 52 --- 53 38 --- 54 54 --- 55 55 --- 56 54 --- 57 57 --- 58 54 --- 59 59 --- 60 60 --- 61 59 --- 62 62 --- 63 59 --- 64 64 --- 65 59 --- 66 66 --- 67 59 --- 68 68 --- 69 59 --- 70 70 --- 71 71 --- 72 72 --- 73 71 --- 74 74 --- 75 75 --- 76 76 --- 77 75 --- 78 78 --- 79 71 --- 80 80 --- 81 ``` -------------------------------- ### JsonSchemaCredential with $ref (Example 6) Source: https://www.w3.org/TR/vc-json-schema Example 6: A JsonSchemaCredential that uses the $ref property to reference an external JSON Schema instead of embedding it. The $ref points to https://example.com/schemas/favorite-color-schema.json. ```json { "@context": [ "https://www.w3.org/ns/credentials/v2", "https://www.w3.org/ns/credentials/examples/v2" ], "id": "https://example.com/credentials/3734", "type": ["VerifiableCredential", "JsonSchemaCredential"], "issuer": "https://example.com/issuers/14", "issuanceDate": "2010-01-01T19:23:24Z", "credentialSchema": { "id": "https://www.w3.org/ns/credentials/json-schema/v2.json", "type": "JsonSchema", }, "credentialSubject": { "id": "https://example.com/schemas/favorite-color-schema.json", "type": "JsonSchema", "jsonSchema": { "$ref": "https://example.com/schemas/favorite-color-schema.json" } } } ``` -------------------------------- ### Mermaid Diagram of Example Verifiable Credential with Integrity Information Source: https://www.w3.org/TR/vc-json-schema Mermaid diagram representing the structure of the example Verifiable Credential with integrity information. It shows the relationships between the credential properties and the credentialSchema with digestSRI. ```mermaid graph LR 82("VerifiableCredential") 83{{"id"}} 84("https://example.com/credentials/3733") 85(("type")) 86("EmailCredential") 87("issuer") 88("https://example.com/issuers/14") 89("issuanceDate") 90("2010-01-01T19:23:24Z") 91("credentialSubject") 92{{"id"}} 93("did:example:ebfeb1f712ebc6f1c276e12ec21") 94("emailAddress") 95("subject@example.com") 96("credentialSchema") 97{{"id"}} 98("https://example.com/schemas/email.json") 99(("type")) 100("JsonSchema") 101("digestSRI") 102("sha384-dNwyy/Zs/YjPor8aoOgnaCqb+PH24QcNFxbxM1XoBOxdbgnpQcVaGYH8QunXww2U") 82 --- 83 83 --- 84 82 --- 85 85 --- 86 82 --- 87 87 --- 88 82 --- 89 89 --- 90 82 --- 91 91 --- 92 92 --- 93 91 --- 94 94 --- 95 82 --- 96 96 --- 97 97 --- 98 96 --- 99 99 --- 100 96 --- 101 101 --- 102 ``` -------------------------------- ### Example 11: Verifiable Credential with Invalid Email (Failure) Source: https://www.w3.org/TR/vc-json-schema A Verifiable Credential that fails JSON Schema validation because the emailAddress field contains 'not an email' instead of a valid email format. This is Example 11 for the Failure Result. ```json { "@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" } } ``` -------------------------------- ### JWT-encoded JsonSchemaCredential example Source: https://www.w3.org/TR/vc-json-schema A JWT-encoded example of a JsonSchemaCredential, showing the credentialSubject containing a jsonSchema property. The JWT is the compact serialization of the JSON-LD credential shown in Example 5. ```jwt eyJhbGciOiJFUzM4NCJ9.eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvdjIiLCJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvZXhhbXBsZXMvdjIiXSwiaWQiOiJodHRwczovL2V4YW1wbGUuY29tL2NyZWRlbnRpYWxzLzM3MzQiLCJ0eXBlIjpbIlZlcmlmaWJsZUNyZWRlbnRpYWwiLCJKc29uU2NoZW1hQ3JlZGVudGlhbCJdLCJpc3N1ZXIiOiJodHRwczovL2V4YW1wbGUuY29tL2lzc3VlcnMvMTQiLCJpc3N1YW5jZURhdGUiOiIyMDEwLTAxLTAxVDE5OjIzOjI0WiIsImNyZWRlbnRpYWxTY2hlbWEiOnsiaWQiOiJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvanNvbi1zY2hlbWEvdjIuanNvbiIsInR5cGUiOiJKc29uU2NoZW1hIiwiZGlnZXN0U1JJIjoic2hhMzg0LVM1N3lRRGcxTVR6RjU2T2k5RGJTUTE0dTdqQnkwUkRkeDBZYmVWN3Nod2hDUzg4RzhTQ1hlRnE4MlBhZmhDclcifSwiY3JlZGVudGlhbFN1YmplY3QiOnsiaWQiOiJodHRwczovL2V4YW1wbGUuY29tL3NjaGVtYXMvZW1haWwtY3JlZGVudGlhbC1zY2hlbWEuanNvbiIsInR5cGUiOiJKc29uU2NoZW1hIiwianNvblNjaGVtYSI6eyIkaWQiOiJodHRwczovL2V4YW1wbGUuY29tL3NjaGVtYXMvZW1haWwtY3JlZGVudGlhbC1zY2hlbWEuanNvbiIsIiRzY2hlbWEiOiJodHRwczovL2pzb24tc2NoZW1hLm9yZy9kcmFmdC8yMDIwLTEyL3NjaGVtYSIsInRpdGxlIjoiRW1haWxDcmVkZW50aWFsIiwiZGVzY3JpcHRpb24iOiJFbWFpbENyZWRlbnRpYWwgdXNpbmcgSnNvblNjaGVtYUNyZWRlbnRpYWwiLCJ0eXBlIjoib2JqZWN0IiwicHJvcGVydGllcyI6eyJjcmVkZW50aWFsU3ViamVjdCI6eyJ0eXBlIjoib2JqZWN0IiwicHJvcGVydGllcyI6eyJlbWFpbEFkZHJlc3MiOnsidHlwZSI6InN0cmluZyIsImZvcm1hdCI6ImVtYWlsIn19LCJyZXF1aXJlZCI6WyJlbWFpbEFkZHJlc3MiXX19fX19fQ.0Elk1YIHMCL4fuzdgrcr-yT9v0nf-9uT5HeFYTFK1P4-f8mqSA3vXi8EEo3v7OE6vtY_hghDmxyUvO3AnEj-TyipzDsKMRar3xeI4SwLNlREk4ausYUlRPjRlgAR9vcL ``` -------------------------------- ### Mermaid diagram of Example JsonSchemaCredential Source: https://www.w3.org/TR/vc-json-schema Mermaid diagram representing the structure of the Example JsonSchemaCredential, showing the relationships between the credential properties. ```mermaid graph LR 19("VerifiableCredential") 20{{"id"}} 21("https://example.com/credentials/3733") 22(("type")) 23("ExampleEmailCredential") 24("issuer") 25("https://example.com/issuers/14") 26("issuanceDate") 27("2010-01-01T19:23:24Z") 28("credentialSubject") 29{{"id"}} 30("did:example:ebfeb1f712ebc6f1c276e12ec21") 31("emailAddress") 32("subject@example.com") 33("credentialSchema") 34{{"id"}} 35("https://example.com/credentials/3734") 36(("type")) 37("JsonSchemaCredential") 19 --- 20 20 --- 21 19 --- 22 22 --- 23 19 --- 24 24 --- 25 19 --- 26 26 --- 27 19 --- 28 28 --- 29 29 --- 30 28 --- 31 31 --- 32 19 --- 33 33 --- 34 34 --- 35 33 --- 36 36 --- 37 ``` -------------------------------- ### Combine multiple schemas with allOf and validate a verifiable credential Source: https://www.w3.org/TR/vc-json-schema Example 16 shows a JSON Schema using the allOf property to combine a verifiable credential schema, a name schema, and an email schema. Example 17 shows a verifiable credential that the combined schema validates, with credentialSubject containing firstName, lastName, and emailAddress. ```json { "allOf": [ { "$ref": "https://raw.githubusercontent.com/w3c/vc-data-model/main/schema/verifiable-credential/verifiable-credential-schema.json" }, { "$id": "name-schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Name schema", "description": "A schema capturing a human name", "type": "object", "properties": { "credentialSubject": { "type": "object", "properties": { "name": { "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "additionalProperties": false }, "required": [ "firstName", "lastName" ] } } } } }, { "$id": "email-schema-1.0", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Email schema", "description": "A schema requiring an email address.", "type": "object", "properties": { "credentialSubject": { "type": "object", "properties": { "email": { "type": "object", "properties": { "emailAddress": { "type": "string", "format": "email" } }, "required": ["emailAddress"] } } } } } ] } ``` ```json { "@context": ["https://www.w3.org/ns/credentials/v2"], "id": "4995c86c-851f-43a6-9dd2-03dc891091fd", "type": ["VerifiableCredential"], "issuer": "did:example:1234", "validFrom": "2023-01-01T05:05:05Z", "credentialSubject": { "firstName": "Alice", "lastName": "Bobertson", "emailAddress": "alice@bobertson.com" }, "credentialSchema": { "id": "multiple-credential-schema-test", "type": "JsonSchemaCredential" } } ``` -------------------------------- ### JsonSchemaCredential Example with Embedded JSON Schema Source: https://www.w3.org/TR/vc-json-schema Example 4: Example Email Credential Schema. This JSON-LD verifiable credential uses the JsonSchemaCredential type and embeds a JSON Schema (draft 2020-12) in the credentialSubject.jsonSchema property. The credentialSchema references the W3C JSON Schema v2 and includes a digestSRI for integrity. ```json { "@context": [ "https://www.w3.org/ns/credentials/v2", "https://www.w3.org/ns/credentials/examples/v2" ], "id": "https://example.com/credentials/3734", "type": ["VerifiableCredential", "JsonSchemaCredential"], "issuer": "https://example.com/issuers/14", "issuanceDate": "2010-01-01T19:23:24Z", "credentialSchema": { "id": "https://www.w3.org/ns/credentials/json-schema/v2.json", "type": "JsonSchema", "digestSRI": "sha384-S57yQDg1MTzF56Oi9DbSQ14u7jBy0RDdx0YbeV7shwhCS88G8SCXeFq82PafhCrW" }, "credentialSubject": { "id": "https://example.com/schemas/email-credential-schema.json", "type": "JsonSchema", "jsonSchema": { "$id": "https://example.com/schemas/email-credential-schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "EmailCredential", "description": "EmailCredential using JsonSchemaCredential", "type": "object", "properties": { "credentialSubject": { "type": "object", "properties": { "emailAddress": { "type": "string", "format": "email" } }, "required": ["emailAddress"] } } } } } ``` -------------------------------- ### Decoded JWT for Failure Example Source: https://www.w3.org/TR/vc-json-schema Decoded JWT header and claimset for the failing credential, showing the ES384 algorithm and the invalid emailAddress. Includes the compact JWT representation. ```text ---------------- Decoded Protected Header ---------------- { "alg": "ES384" } ---------------- Decoded Protected Claimset ---------------- { "@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" } } ---------------- Compact Encoded JSON Web Token ---------------- eyJhbGciOiJFUzM4NCJ9.eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvdjIiLCJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvZXhhbXBsZXMvdjIiXSwiaWQiOiJodHRwczovL2V4YW1wbGUuY29tL2NyZWRlbnRpYWxzLzM3MzIiLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiRW1haWxDcmVkZW50aWFsIl0sImlzc3VlciI6Imh0dHBzOi8vZXhhbXBsZS5jb20vaXNzdWVycy8xNCIsImlzc3VhbmNlRGF0ZSI6IjIwMTAtMDEtMDFUMTk6MjM6MjRaIiwiY3JlZGVudGlhbFN1YmplY3QiOnsiaWQiOiJkaWQ6ZXhhbXBsZTplYmZlYjFmNzEyZWJjNmYxYzI3NmUxMmVjMjEiLCJlbWFpbEFkZHJlc3MiOiJub3QgYW4gZW1haWwifSwiY3JlZGVudGlhbFNjaGVtYSI6eyJpZCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vc2NoZW1hcy9lbWFpbC5qc29uIiwidHlwZSI6Ikpzb25TY2hlbWEifX0.XrAwFAwm8CAJa4aB5BsUmLOf8N7Xm596hbydCVeQflR_VqbLBKMeJN0cJlBv0dCEPO-WA-oVq-k7SjgTX5wC6VCObu3DsCxytNo8F47bYmKOZfOhn7s_jLu2_hinE1NI ``` -------------------------------- ### JWT encoding of Example JsonSchemaCredential Source: https://www.w3.org/TR/vc-json-schema Decoded JWT header, claimset, and compact encoded token for the Example JsonSchemaCredential. The protected header uses ES384 algorithm. ```json { "alg": "ES384" } ``` ```json { "@context": [ "https://www.w3.org/ns/credentials/v2", "https://www.w3.org/ns/credentials/examples/v2" ], "id": "https://example.com/credentials/3733", "type": [ "VerifiableCredential", "ExampleEmailCredential" ], "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/credentials/3734", "type": "JsonSchemaCredential" } } ``` ```text eyJhbGciOiJFUzM4NCJ9.eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvdjIiLCJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvZXhhbXBsZXMvdjIiXSwiaWQiOiJodHRwczovL2V4YW1wbGUuY29tL2NyZWRlbnRpYWxzLzM3MzMiLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiRXhhbXBsZUVtYWlsQ3JlZGVudGlhbCJdLCJpc3N1ZXIiOiJodHRwczovL2V4YW1wbGUuY29tL2lzc3VlcnMvMTQiLCJpc3N1YW5jZURhdGUiOiIyMDEwLTAxLTAxVDE5OjIzOjI0WiIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmV4YW1wbGU6ZWJmZWIxZjcxMmViYzZmMWMyNzZlMTJlYzIxIiwiZW1haWxBZGRyZXNzIjoic3ViamVjdEBleGFtcGxlLmNvbSJ9LCJjcmVkZW50aWFsU2NoZW1hIjp7ImlkIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9jcmVkZW50aWFscy8zNzM0IiwidHlwZSI6Ikpzb25TY2hlbWFDcmVkZW50aWFsIn19.8MbAcFXJf5z1U2_M1_Lw_likfl06fB_vLb4psRFyuOOx7Nv88DdBuDqtvWr1vE5eWsmOTZ-w6qdIbGJFS1sRcUGH2sbPsEzaj43ds9m6jheR-Xhq45adkXgCaGrY_0GZ ```