From 612b082d754eb90402160f423d939f3a6f9ec181 Mon Sep 17 00:00:00 2001 From: nklomp Date: Sat, 29 Apr 2023 22:38:35 +0200 Subject: [PATCH] fix: decoded JWT VPs/VCs did not contain everything --- .../vc-handler-ld-local/plugin.schema.json | 110 ++++++++++++++---- 1 file changed, 90 insertions(+), 20 deletions(-) diff --git a/packages/vc-handler-ld-local/plugin.schema.json b/packages/vc-handler-ld-local/plugin.schema.json index 5bd7114b1..7ccb921b0 100644 --- a/packages/vc-handler-ld-local/plugin.schema.json +++ b/packages/vc-handler-ld-local/plugin.schema.json @@ -31,7 +31,9 @@ "description": "Use this purpose for the verification method in the DID when doing a check (defaults to CredentialIssuancePurpose)" } }, - "required": ["credential"], + "required": [ + "credential" + ], "description": "Encapsulates the parameters required to create a\n {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential }" }, "CredentialPayload": { @@ -68,7 +70,9 @@ "type": "string" } }, - "required": ["issuer"], + "required": [ + "issuer" + ], "description": "Used as input when creating Verifiable Credentials" }, "IssuerType": { @@ -80,7 +84,9 @@ "type": "string" } }, - "required": ["id"] + "required": [ + "id" + ] }, { "type": "string" @@ -111,7 +117,10 @@ "type": "string" } }, - "required": ["id", "type"], + "required": [ + "id", + "type" + ], "description": "Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific `credentialStatus` type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#status | Credential Status }" }, "IAuthenticationProofPurpose": { @@ -309,7 +318,13 @@ ] } }, - "required": ["@context", "credentialSubject", "issuanceDate", "issuer", "proof"] + "required": [ + "@context", + "credentialSubject", + "issuanceDate", + "issuer", + "proof" + ] }, "CredentialStatusSP": { "type": "object", @@ -327,7 +342,10 @@ "type": "string" } }, - "required": ["id", "type"] + "required": [ + "id", + "type" + ] }, "CredentialProofSP": { "type": "object", @@ -380,7 +398,12 @@ } } }, - "required": ["type", "created", "proofPurpose", "verificationMethod"], + "required": [ + "type", + "created", + "proofPurpose", + "verificationMethod" + ], "additionalProperties": { "anyOf": [ { @@ -459,7 +482,9 @@ ] } }, - "required": ["presentation"], + "required": [ + "presentation" + ], "description": "Encapsulates the parameters required to create a\n {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation }" }, "PresentationPayload": { @@ -502,7 +527,9 @@ "type": "string" } }, - "required": ["holder"], + "required": [ + "holder" + ], "description": "Used as input when creating Verifiable Presentations" }, "W3CVerifiableCredential": { @@ -567,7 +594,13 @@ "type": "string" } }, - "required": ["@context", "credentialSubject", "issuanceDate", "issuer", "proof"], + "required": [ + "@context", + "credentialSubject", + "issuanceDate", + "issuer", + "proof" + ], "description": "Represents a signed Verifiable Credential payload (includes proof), using a JSON representation. See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model }" }, "CompactJWT": { @@ -647,7 +680,13 @@ ] } }, - "required": ["@context", "holder", "proof", "type", "verifiableCredential"] + "required": [ + "@context", + "holder", + "proof", + "type", + "verifiableCredential" + ] }, "W3CVerifiableCredentialSP": { "anyOf": [ @@ -681,7 +720,11 @@ "description": "List of descriptors of how the claims are being mapped to presentation definition" } }, - "required": ["id", "definition_id", "descriptor_map"], + "required": [ + "id", + "definition_id", + "descriptor_map" + ], "description": "It expresses how the inputs are presented as proofs to a Verifier." }, "Descriptor": { @@ -703,7 +746,11 @@ "description": "The Proof or JWT algorith that the proof is in" } }, - "required": ["id", "path", "format"], + "required": [ + "id", + "path", + "format" + ], "description": "descriptor map laying out the structure of the presentation submission." }, "IVerifyCredentialLDArgs": { @@ -747,11 +794,18 @@ "$ref": "#/components/schemas/interface-ib.es5.d.ts-10057-11521-ib.es5.d.ts-0-217681" } }, - "required": ["prototype", "length", "arguments", "caller"], + "required": [ + "prototype", + "length", + "arguments", + "caller" + ], "description": "Check status function, to check credentials that have a credentialStatus property" } }, - "required": ["credential"], + "required": [ + "credential" + ], "description": "Encapsulates the parameters required to verify a\n {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential }" }, "interface-ib.es5.d.ts-10057-11521-ib.es5.d.ts-0-217681": { @@ -766,7 +820,12 @@ "$ref": "#/components/schemas/interface-ib.es5.d.ts-10057-11521-ib.es5.d.ts-0-217681" } }, - "required": ["prototype", "length", "arguments", "caller"] + "required": [ + "prototype", + "length", + "arguments", + "caller" + ] }, "IVerifyPresentationLDArgs": { "type": "object", @@ -817,11 +876,18 @@ "$ref": "#/components/schemas/interface-ib.es5.d.ts-10057-11521-ib.es5.d.ts-0-217681" } }, - "required": ["prototype", "length", "arguments", "caller"], + "required": [ + "prototype", + "length", + "arguments", + "caller" + ], "description": "Check status function, to check credentials that have a credentialStatus property" } }, - "required": ["presentation"], + "required": [ + "presentation" + ], "description": "Encapsulates the parameters required to verify a\n {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation }" }, "VerifiablePresentation": { @@ -881,7 +947,11 @@ "type": "string" } }, - "required": ["@context", "holder", "proof"], + "required": [ + "@context", + "holder", + "proof" + ], "description": "Represents a signed Verifiable Presentation (includes proof), using a JSON representation. See {@link https://www.w3.org/TR/vc-data-model/#presentations | VP data model }" } }, @@ -925,4 +995,4 @@ } } } -} +} \ No newline at end of file