This repository has been archived by the owner on Jan 16, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yml
102 lines (92 loc) · 2.54 KB
/
swagger.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
swagger: "2.0" # https://stackoverflow.com/a/59749691/14797322
info:
title: "JCP"
description: "A JWK Set client proxy."
version: "0.0.1"
schemes:
- "http"
- "https"
consumes:
- "application/json"
produces:
- "application/json"
paths:
/v1/validate:
post:
summary: "Validate a JWT."
description: "Validate a JWT with the given arguments. Keys from any of the configured remote JWK Set resources can be used to parse it."
operationId: "validate"
parameters:
- in: "body"
name: "body"
description: "The JWT validation request."
required: true
schema:
$ref: "#/definitions/ValidateRequest"
responses:
200:
description: "The token has been processed. Make sure to check the response body."
schema:
$ref: "#/definitions/ValidateResponse"
default:
description: "An error occurred."
schema:
$ref: "#/definitions/ErrorResponse"
definitions:
ErrorResponse:
type: "object"
properties:
code:
type: "integer"
description: "A copy of the HTTP response status code."
meta:
$ref: "#/definitions/RequestMetadata"
msg:
type: "string"
description: "A human-readable error message."
RequestMetadata:
type: "object"
properties:
uuid:
type: "string"
description: "A UUID that uniquely identifies the request."
format: "uuid"
ValidateArgs:
type: "object"
properties:
aud:
type: "array"
description: "A set of JWT aud claim values to check for. If there are no matching values, validation will fail."
items:
type: "string"
iss:
type: "array"
description: "A set of JWT iss claim values to check for. If there are no matching values, validation will fail."
items:
type: "string"
sub:
type: "array"
description: "A set of JWT sub claim values to check for. If there are no matching values, validation will fail."
items:
type: "string"
token:
type: "string"
description: "The JWT to validate."
required:
- "token"
ValidateRequest:
properties:
args:
$ref: "#/definitions/ValidateArgs"
required:
- "args"
ValidateResponse:
properties:
meta:
$ref: "#/definitions/RequestMetadata"
results:
$ref: "#/definitions/ValidateResults"
ValidateResults:
properties:
success:
type: "boolean"