-
Notifications
You must be signed in to change notification settings - Fork 2
/
Swagger - Multiple Authentication.json
282 lines (282 loc) · 8.18 KB
/
Swagger - Multiple Authentication.json
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
---
swagger: '2.0'
info:
version: '1.0'
title: Multiple Authentication Tests
contact: {}
host: api.lowercase.sample.com
basePath: "/"
securityDefinitions:
basicAuth:
type: basic
description: A user must provide his user name and password used for logging into
ABC product.
oAuth2_authorization_code:
type: oauth2
description: OAuth 2.0 flows.
flow: accessCode
authorizationUrl: http://example.com/authorize
tokenUrl: http://exampletoken.com/token
scopes:
'123': ''
notes-:read: Can read al"alert('xxs')"l notes.
notes-write: Can create, update and delete notes."alert('xxs')"
meow: ''
oAuth2_client_credentials:
type: oauth2
description: OAuth 2.0 flows.
flow: application
tokenUrl: http://exampletoken.com/tokenaaaa
scopes:
'123': ''
notes-:read: Can read al"alert('xxs')"l notes.
notes-write: Can create, update and delete notes."alert('xxs')"
meow: ''
oAuth2_implicit:
type: oauth2
description: OAuth 2.0 flows.
flow: implicit
authorizationUrl: http://example.com/authorize
scopes:
'123': ''
notes-:read: Can read al"alert('xxs')"l notes.
notes-write: Can create, update and delete notes."alert('xxs')"
meow: ''
oAuth2Again_authorization_code:
type: oauth2
description: OAuth 2.0 flows again with different URLs.
flow: accessCode
authorizationUrl: http://examples.com/authorizeAgain
tokenUrl: http://examplestoken.com/tokenAgain
scopes:
'123': ''
book:-read: Can read al"alert('xxs')"l notes.
book-write: Can create, update and delete notes."alert('xxs')"
novel-read: ''
oAuth2Again_client_credentials:
type: oauth2
description: OAuth 2.0 flows again with different URLs.
flow: application
tokenUrl: http://examplestoken.com/tokenAgain
scopes:
'123': ''
book:-read: Can read al"alert('xxs')"l notes.
book-write: Can create, update and delete notes."alert('xxs')"
novel-read: ''
apiHeader:
type: apiKey
description: A user can alternatively provide an API key to log into the service
name: key
in: header
schemes:
- http
consumes:
- application/json
produces:
- application/json
paths:
"/override":
get:
description: This endpoint overrides globally applied auth.
summary: OverridesAuth
tags:
- ABC
operationId: OverridesAuth
deprecated: false
produces:
- text/plain
parameters: []
responses:
'204':
description: ''
schema:
type: string
default: ''
format: date-time-rfc1123
headers: {}
x-security-options-meta:
- name: No Authentication
description: Applying authentication is optional.
- name: API Header
- name: Double OAuth 2 With Authorization Code and Client Credentials and API
header
description: Apply a double layer of OAuth 2.0 authorization code and client
credential flows as well as an API header.
- description: ''
- name: API Header and OAuth 2.0 Client Credentials
description: Apply a combination of API Header and OAuth 2.0 client credentials
flows.
- description: ''
- name: Double OAuth 2 Implicit and Client Credentials and API Header
security:
- {}
- apiHeader: []
- oAuth2_authorization_code:
- notes-:read
- meow
oAuth2Again_client_credentials:
- book:-read
- novel-read
apiHeader: []
- oAuth2_client_credentials:
- notes-:read
- meow
oAuth2Again_authorization_code:
- book:-read
- novel-read
apiHeader: []
- oAuth2_client_credentials:
- notes-:read
- meow
oAuth2Again_client_credentials:
- book:-read
- novel-read
apiHeader: []
- oAuth2_implicit:
- notes-:read
- meow
oAuth2Again_authorization_code:
- book:-read
- novel-read
apiHeader: []
- oAuth2_implicit:
- notes-:read
- meow
oAuth2Again_client_credentials:
- book:-read
- novel-read
apiHeader: []
"/globalauth":
get:
description: This endpoint uses globally applied auth.
summary: GlobalAuth
tags:
- ABC
operationId: GlobalAuth
deprecated: true
produces:
- application/json
parameters: []
responses:
'200':
description: ''
schema:
type: array
default: ''
items:
type: string
format: date
examples:
application/json:
- '1994-02-13'
- '1994-02-13'
headers: {}
externalDocs:
url: http://swagger.io/endpoint1
description: Swagger URL Endpoint 1
"/noauth":
get:
description: This endpoint does not use auth.
summary: NoAuth
tags:
- ABC
operationId: NoAuth
deprecated: true
produces:
- application/json
parameters:
- name: array
in: query
required: true
type: boolean
description: ''
responses:
'200':
description: ''
schema:
type: array
default: ''
items:
type: string
format: date
examples:
application/json:
- '1994-02-13'
- '1994-02-13'
headers: {}
security: []
externalDocs:
url: http://swagger.io/endpoint1
description: Swagger URL Endpoint 1
security:
- apiHeader: []
basicAuth: []
- oAuth2_authorization_code:
- notes-:read
oAuth2Again_authorization_code:
- book-write
- oAuth2_authorization_code:
- notes-:read
oAuth2Again_client_credentials:
- book-write
- oAuth2_client_credentials:
- notes-:read
oAuth2Again_authorization_code:
- book-write
- oAuth2_client_credentials:
- notes-:read
oAuth2Again_client_credentials:
- book-write
- oAuth2_implicit:
- notes-:read
oAuth2Again_authorization_code:
- book-write
- oAuth2_implicit:
- notes-:read
oAuth2Again_client_credentials:
- book-write
- apiHeader: []
oAuth2_authorization_code:
- notes-write
- apiHeader: []
oAuth2_client_credentials:
- notes-write
- apiHeader: []
oAuth2_implicit:
- notes-write
- basicAuth: []
oAuth2Again_authorization_code:
- book:-read
- basicAuth: []
oAuth2Again_client_credentials:
- book:-read
x-security-options-meta:
- name: API Header and Basic Authentication
description: Authenticate with a combination of API header and basic authentication.
- name: Double OAuth 2 With Authorization Code
description: Apply a double layer of OAuth 2.0 authorization code flows.
- name: Double OAuth 2 With Authorization Code and Client Credentials
description: Apply a double layer of OAuth 2.0 authorization code and client credential
flows.
- description: ''
- name: Double OAuth 2 With Client Credentials
description: Apply a double layer of OAuth 2.0 client credentials flows.
- description: ''
- name: Double OAuth 2 Implicit and Client Credentials
- name: API Header and OAuth 2.0 Authorization Code
description: Apply a combination of API Header and OAuth 2.0 authorization code
flows.
- name: API Header and OAuth 2.0 Client Credentials
description: Apply a combination of API Header and OAuth 2.0 client credentials
flows.
- name: API Header and OAuth 2.0 Implicit
description: Apply a combination of API Header and OAuth 2.0 implicit flows.
- name: Basic Authentication and OAuth 2.0 Authorization Code
description: Apply a combination of basic authentication and OAuth 2.0 authorization
code flows.
- name: Basic Authentication and OAuth 2.0 Client Credentials
description: Apply a combination of basic authentication and OAuth 2.0 client credentials
flows.
tags:
- name: ABC
description: ''