-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoauth-swagger.json
228 lines (228 loc) · 7.69 KB
/
oauth-swagger.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
{
"x-generator": "NSwag v13.10.7.0 (NJsonSchema v10.3.9.0 (Newtonsoft.Json v13.0.0.0))",
"openapi": "3.0.0",
"info": {
"title": "Laserfiche OAuth 2.0 Authorization Server API",
"description": "An ASP.NET Core web API for Laserfiche OAuth 2.0 Authorization Server<p><strong>Build# : </strong>88d38745d0d096390903e3ffa44be86f7eb02735_.20230301.2</p>",
"version": "1.0.0"
},
"servers": [
{
"url": "https://signin.laserfiche.com/oauth"
}
],
"paths": {
"/Token": {
"post": {
"tags": [
"Token"
],
"summary": "Request for an access token.\n- Use authCode to get an access token for the authorization code flow. This uses grant_type, code, and redirect_uri. The client ID and client secret are taken from the Basic auth header for web applications. For SPAs, the client ID should be in the request body. After getting the authorization code, the application can exchange the code for an access token by calling this endpoint. Authorization code has a short lifetime of around 10 minutes. If it is not used within its lifetime, it will expire and the application should restart the authorization code flow.\n- Use refreshToken to get a new access token for the authorization code flow. This uses grant_type and refresh_token. The client ID and client secret are taken from the Basic auth header for web applications. For SPAs, the client ID should be in the request body.\n- Use Bearer header to generate an access token for the client credentials flow. This uses grant_type and bearer auth header.",
"operationId": "Token_GetAccessToken",
"parameters": [
{
"name": "Authorization",
"in": "header",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"requestBody": {
"x-name": "body",
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"title": "GetAccessTokenRequest",
"type": "object",
"description": "The request to the Laserfiche Cloud OAuth 2.0 token endpoint.",
"additionalProperties": false,
"required": [
"grant_type"
],
"properties": {
"client_id": {
"type": [
"null",
"string"
],
"description": "The Client ID returned when the application was registered."
},
"grant_type": {
"type": "string",
"description": "The value MUST be either of \"authorization_code\", \"refresh_token\", or \"client_credentials\".",
"minLength": 1
},
"code": {
"type": [
"null",
"string"
],
"description": "The authorization code returned by the authorization server in the first step of the authorization code flow."
},
"redirect_uri": {
"type": [
"null",
"string"
],
"description": "This should be equal to the Redirect URI sent to /authorize endpoint in the first step of the authorization code flow."
},
"scope": {
"type": [
"null",
"string"
],
"description": "The scope of the requested access token in the client credentials flow. Scopes are case-sensitive and space-delimited."
},
"refresh_token": {
"type": [
"null",
"string"
],
"description": "The refresh token, which can be used to obtain new access tokens."
},
"code_verifier": {
"type": [
"null",
"string"
],
"description": "A code verifier, used to verify the code_challenge sent to /authorize endpoint in the first step of the authorization code flow."
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetAccessTokenResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"ProblemDetails": {
"type": "object",
"additionalProperties": {
"nullable": true
},
"properties": {
"type": {
"type": "string",
"nullable": true
},
"title": {
"type": "string",
"nullable": true
},
"status": {
"type": "integer",
"format": "int32",
"nullable": true
},
"detail": {
"type": "string",
"nullable": true
},
"instance": {
"type": "string",
"nullable": true
}
}
},
"GetAccessTokenResponse": {
"type": "object",
"description": "The response from the Laserfiche Cloud OAuth 2.0 token endpoint.",
"additionalProperties": false,
"properties": {
"access_token": {
"type": "string",
"description": "The Laserfiche Cloud OAuth 2.0 access token.",
"nullable": true
},
"expires_in": {
"type": "integer",
"description": "The lifetime in seconds of the access token.",
"format": "int32"
},
"token_type": {
"type": "string",
"description": "The token type that provides how to utilize the access token.",
"nullable": true
},
"refresh_token": {
"type": "string",
"description": "An optional refresh token used to get a new Laserfiche Cloud OAuth 2.0 access token.",
"nullable": true
},
"scope": {
"type": "string",
"description": "The scope configured on the access token.",
"nullable": true
}
}
}
},
"securitySchemes": {
"Basic Authorization": {
"type": "http",
"in": "header",
"scheme": "basic"
},
"Authorization": {
"type": "http",
"in": "header",
"scheme": "bearer"
}
}
},
"security": [
{
"Basic Authorization": []
},
{
"Authorization": []
}
]
}