decentralized-identity / .well-known

Specs and documentation for all DID-related /.well-known resources
https://identity.foundation/.well-known
Apache License 2.0
56 stars 15 forks source link

Update JWT VC to use kid #72

Closed clehner closed 1 year ago

clehner commented 3 years ago

The JWT VC in Example 2 and in did-configuration.json is missing the kid JOSE header parameter, which must be present, according to § 4.2 JSON Web Token Proof Format.

Fortunately, the JWT VC in Example 4: Compact JWT Domain Linkage Credential is similar to the first one but contains the kid parameter. So this PR replaces occurences of the JWT VC currently in Example 2 with the one currently in Example 4.

The payload of the two VCs differ in their issuance dates and expiration dates, by a few minutes, as shown in the following expansion.

--- example-2-expanded  2021-07-13 14:09:59.745911401 -0400
+++ example-4-expanded  2021-07-13 14:09:57.345855205 -0400
@@ -1,10 +1,11 @@
 {
-  "alg": "EdDSA"
+  "alg": "EdDSA",
+  "kid": "did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM#z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM"
 }
 {
-  "exp": 1764878908,
+  "exp": 1764879139,
   "iss": "did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM",
-  "nbf": 1607112508,
+  "nbf": 1607112739,
   "sub": "did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM",
   "vc": {
     "@context": [
@@ -15,8 +16,8 @@
       "id": "did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM",
       "origin": "identity.foundation"
     },
-    "expirationDate": "2025-12-04T14:08:28-06:00",
-    "issuanceDate": "2020-12-04T14:08:28-06:00",
+    "expirationDate": "2025-12-04T14:12:19-06:00",
+    "issuanceDate": "2020-12-04T14:12:19-06:00",
     "issuer": "did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM",
     "type": [
       "VerifiableCredential",
@@ -24,4 +25,4 @@
     ]
   }
 }
-6ovgQ-T_rmYueviySqXhzMzgqJMAizOGUKAObQr2iikoRNsb8DHfna4rh1puwWqYwgT3QJVpzdO_xZARAYM9Dw
+aUFNReA4R5rcX_oYm3sPXqWtso_gjPHnWZsB6pWcGv6m3K8-4JIAvFov3ZTM8HxPOrOL17Qf4vBFdY9oK0HeCQ