forked from w3c-ccg/vc-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
verifier.yml
87 lines (87 loc) · 3.62 KB
/
verifier.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
openapi: 3.0.0
info:
version: "0.0.3-unstable"
title: VC Verifier HTTP API
description: This is an Experimental Open API Specification for the [VC Data Model](https://www.w3.org/TR/vc-data-model/).
license:
name: W3C Software and Document License
url: http://www.w3.org/Consortium/Legal/copyright-software.
contact:
name: GitHub Source Code
url: https://github.com/w3c-ccg/vc-http-api
paths:
/credentials/verify:
post:
summary: Verifies a verifiableCredential and returns a verificationResult in the response body.
operationId: verifyCredential
description: Verifies a verifiableCredential and returns a verificationResult in the response body.
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/VerifyCredentialRequest"
description: Parameters for verifying a verifiableCredential.
responses:
"200":
description: Verifiable Credential successfully verified!
content:
application/json:
schema:
$ref: "#/components/schemas/VerifyCredentialResponse"
"400":
description: invalid input!
"500":
description: error!
/presentations/verify:
post:
summary: Verifies a Presentation with or without proofs attached and returns a verificationResult in the response body.
operationId: verifyPresentation
description: Verifies a verifiablePresentation and returns a verificationResult in the response body. Given the possibility of denial of service, buffer overflow, or other style attacks, an implementation is permitted to rate limit or restrict requests against this API endpoint to those requests that contain only a single credential with a 413 or 429 error code as appropriate.
requestBody:
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/VerifyPresentationRequest"
- $ref: "#/components/schemas/ProoflessVerifyPresentationRequest"
description: Parameters for verifying a verifiablePresentation.
responses:
"200":
description: Verifiable Presentation successfully verified!
content:
application/json:
schema:
$ref: "#/components/schemas/VerifyPresentationResponse"
"400":
description: Invalid or malformed input
"413":
description: Payload too large
"429":
description: Request rate limit exceeded.
"500":
description: Internal Server Error
components:
schemas:
VerifyCredentialRequest:
type: object
properties:
verifiableCredential:
$ref: "./components/VerifiableCredential.yml#/components/schemas/VerifiableCredential"
options:
$ref: "./components/VerifyOptions.yml#/components/schemas/VerifyOptions"
VerifyCredentialResponse:
$ref: "./components/VerificationResult.yml#/components/schemas/VerificationResult"
VerifyPresentationRequest:
type: object
properties:
verifiablePresentation:
$ref: "./components/VerifiablePresentation.yml#/components/schemas/VerifiablePresentation"
options:
$ref: "./components/VerifyOptions.yml#/components/schemas/VerifyOptions"
ProoflessVerifyPresentationRequest:
type: object
properties:
presentation:
$ref: "./components/Presentation.yml#/components/schemas/Presentation"
VerifyPresentationResponse:
$ref: "./components/VerificationResult.yml#/components/schemas/VerificationResult"