@limecloud/cli 0.0.0-stage → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +292 -2
- package/bin/limecloud-cli.mjs +5 -0
- package/dist/identity.json +1453 -0
- package/dist/locales.json +17 -0
- package/dist/management.json +24928 -0
- package/package.json +36 -4
- package/src/cli.mjs +366 -0
- package/src/commands.mjs +70 -0
- package/src/contract.mjs +68 -0
- package/src/i18n.mjs +68 -0
- package/src/input.mjs +92 -0
- package/src/install.mjs +91 -0
- package/src/locales/en.json +153 -0
- package/src/locales/zh-CN.json +153 -0
- package/src/management.mjs +161 -0
- package/src/output.mjs +61 -0
- package/src/protocol.mjs +148 -0
- package/src/resources.mjs +11 -0
- package/src/storage.mjs +96 -0
|
@@ -0,0 +1,1453 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Lime Identity API",
|
|
5
|
+
"version": "0.6.0",
|
|
6
|
+
"description": "Implemented public OAuth 2.0 and OpenID Connect endpoints. Plain protocol responses; separate from authenticated management BFF APIs."
|
|
7
|
+
},
|
|
8
|
+
"servers": [
|
|
9
|
+
{
|
|
10
|
+
"url": "https://auth.limeai.run",
|
|
11
|
+
"description": "Production"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"url": "https://auth.limeai.local",
|
|
15
|
+
"description": "Local development"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"paths": {
|
|
19
|
+
"/.well-known/openid-configuration": {
|
|
20
|
+
"get": {
|
|
21
|
+
"operationId": "identity_discovery",
|
|
22
|
+
"summary": "OpenID configuration",
|
|
23
|
+
"x-lime-summary-zh-CN": "OpenID 配置",
|
|
24
|
+
"description": "Read issuer metadata on the Auth host. Use an OIDC library to discover endpoints and supported algorithms.",
|
|
25
|
+
"x-lime-zh-CN": "在 Auth 域名读取 issuer 元数据,使用 OIDC 库发现端点与支持算法。",
|
|
26
|
+
"tags": [
|
|
27
|
+
"Identity"
|
|
28
|
+
],
|
|
29
|
+
"security": [],
|
|
30
|
+
"responses": {
|
|
31
|
+
"200": {
|
|
32
|
+
"description": "Issuer metadata.",
|
|
33
|
+
"x-lime-zh-CN": "Issuer 元数据。",
|
|
34
|
+
"content": {
|
|
35
|
+
"application/json": {
|
|
36
|
+
"schema": {
|
|
37
|
+
"$ref": "#/components/schemas/Discovery"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"/oauth/authorize": {
|
|
46
|
+
"get": {
|
|
47
|
+
"operationId": "identity_authorize",
|
|
48
|
+
"summary": "Authorize a user",
|
|
49
|
+
"x-lime-summary-zh-CN": "用户授权",
|
|
50
|
+
"description": "Navigate the user's browser here. Register the client and exact redirect URI first. Production clients must be activated against a published version; installation authorization requires both installation_id and space_id. User consent remains separate from installation approval. The callback contains code+state or error+state; never accept it without checking the bound state.",
|
|
51
|
+
"x-lime-zh-CN": "将用户浏览器导航至此。先登记客户端和精确回调。生产客户端须基于已发布版本启用;安装授权须同时提供 installation_id 和 space_id。个人同意与安装批准分别判定。回调包含 code+state 或 error+state,必须校验绑定的 state 后再处理。",
|
|
52
|
+
"tags": [
|
|
53
|
+
"Identity"
|
|
54
|
+
],
|
|
55
|
+
"security": [],
|
|
56
|
+
"parameters": [
|
|
57
|
+
{
|
|
58
|
+
"name": "response_type",
|
|
59
|
+
"in": "query",
|
|
60
|
+
"required": true,
|
|
61
|
+
"schema": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"const": "code"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "client_id",
|
|
68
|
+
"in": "query",
|
|
69
|
+
"required": true,
|
|
70
|
+
"description": "Public or confidential user-client ID. Always send it in this query; never send a client secret to the authorization endpoint.",
|
|
71
|
+
"x-lime-zh-CN": "公共或机密用户客户端 ID。所有用户客户端均在此查询参数中提供 ID,不得向授权端点发送 Secret。",
|
|
72
|
+
"schema": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "redirect_uri",
|
|
78
|
+
"in": "query",
|
|
79
|
+
"required": true,
|
|
80
|
+
"description": "Exact registered callback. Production requires HTTPS; sandbox accepts an explicitly registered HTTP loopback callback.",
|
|
81
|
+
"x-lime-zh-CN": "精确匹配已登记回调。生产要求 HTTPS;沙箱可使用显式登记的 HTTP 回环地址。",
|
|
82
|
+
"schema": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"format": "uri"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "scope",
|
|
89
|
+
"in": "query",
|
|
90
|
+
"required": false,
|
|
91
|
+
"description": "Space-separated scopes registered on this client. openid is required for sign-in; profile, email and offline_access are optional.",
|
|
92
|
+
"x-lime-zh-CN": "客户端已登记的权限,以空格分隔。登录须含 openid,可选 profile、email、offline_access。",
|
|
93
|
+
"schema": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "state",
|
|
99
|
+
"in": "query",
|
|
100
|
+
"required": true,
|
|
101
|
+
"description": "Unguessable transaction value, at least 16 characters. Compare it with the value bound to the initiating browser session before accepting any callback.",
|
|
102
|
+
"x-lime-zh-CN": "至少 16 字符的不可预测事务值。接收任何回调前,与发起浏览器会话绑定的原值比较。",
|
|
103
|
+
"schema": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"minLength": 16
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "nonce",
|
|
110
|
+
"in": "query",
|
|
111
|
+
"required": false,
|
|
112
|
+
"description": "Unguessable value, at least 16 characters, required when requesting openid. Verify it in the ID token.",
|
|
113
|
+
"x-lime-zh-CN": "请求 openid 时必填,至少 16 字符且不可预测,并在 ID Token 中校验。",
|
|
114
|
+
"schema": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"minLength": 16
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "code_challenge",
|
|
121
|
+
"in": "query",
|
|
122
|
+
"required": true,
|
|
123
|
+
"description": "Base64url(SHA256(code_verifier)), without padding.",
|
|
124
|
+
"x-lime-zh-CN": "对 code_verifier 计算 SHA-256 后进行无填充 Base64url 编码。",
|
|
125
|
+
"schema": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"minLength": 43,
|
|
128
|
+
"maxLength": 43
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "code_challenge_method",
|
|
133
|
+
"in": "query",
|
|
134
|
+
"required": true,
|
|
135
|
+
"schema": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"const": "S256"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "response_mode",
|
|
142
|
+
"in": "query",
|
|
143
|
+
"required": false,
|
|
144
|
+
"schema": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"enum": [
|
|
147
|
+
"query"
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "prompt",
|
|
153
|
+
"in": "query",
|
|
154
|
+
"required": false,
|
|
155
|
+
"description": "Optional prompt. Silent consent reuse is not implemented; prompt=none can return login_required or consent_required.",
|
|
156
|
+
"x-lime-zh-CN": "可选交互方式。当前未实现静默复用同意,prompt=none 可能返回 login_required 或 consent_required。",
|
|
157
|
+
"schema": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"enum": [
|
|
160
|
+
"login",
|
|
161
|
+
"consent",
|
|
162
|
+
"none"
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "max_age",
|
|
168
|
+
"in": "query",
|
|
169
|
+
"required": false,
|
|
170
|
+
"description": "Maximum acceptable authentication age, in seconds.",
|
|
171
|
+
"x-lime-zh-CN": "可接受的认证最长经过秒数。",
|
|
172
|
+
"schema": {
|
|
173
|
+
"type": "integer",
|
|
174
|
+
"minimum": 0,
|
|
175
|
+
"maximum": 2147483647
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "ui_locales",
|
|
180
|
+
"in": "query",
|
|
181
|
+
"required": false,
|
|
182
|
+
"description": "Preferred sign-in UI languages, in order; supports en and zh-CN.",
|
|
183
|
+
"x-lime-zh-CN": "按优先级排列的认证界面语言,支持 en 和 zh-CN。",
|
|
184
|
+
"schema": {
|
|
185
|
+
"type": "string"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "installation_id",
|
|
190
|
+
"in": "query",
|
|
191
|
+
"required": false,
|
|
192
|
+
"description": "Production installation ID. Supply together with space_id when authorizing an enterprise installation.",
|
|
193
|
+
"x-lime-zh-CN": "生产安装 ID。授权企业安装时须与 space_id 同时传入。",
|
|
194
|
+
"schema": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"maxLength": 40
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"name": "space_id",
|
|
201
|
+
"in": "query",
|
|
202
|
+
"required": false,
|
|
203
|
+
"description": "Workspace containing the installation. This does not select a global current workspace.",
|
|
204
|
+
"x-lime-zh-CN": "安装所属的工作空间,不用于选择全局当前空间。",
|
|
205
|
+
"schema": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"maxLength": 40
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"responses": {
|
|
212
|
+
"302": {
|
|
213
|
+
"description": "Redirect to sign-in, consent or the validated callback. Callback codes are single-use and short-lived.",
|
|
214
|
+
"x-lime-zh-CN": "跳转登录、同意页或已验证的回调。回调授权码一次性且短期有效。",
|
|
215
|
+
"headers": {
|
|
216
|
+
"Location": {
|
|
217
|
+
"required": true,
|
|
218
|
+
"schema": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"format": "uri"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"400": {
|
|
226
|
+
"description": "Invalid protocol request or grant. Device polling also uses this status for authorization_pending and slow_down.",
|
|
227
|
+
"x-lime-zh-CN": "协议请求或授权无效。设备轮询的 authorization_pending 和 slow_down 也使用此状态。",
|
|
228
|
+
"content": {
|
|
229
|
+
"application/json": {
|
|
230
|
+
"schema": {
|
|
231
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"401": {
|
|
237
|
+
"description": "Client authentication failed.",
|
|
238
|
+
"x-lime-zh-CN": "客户端认证失败。",
|
|
239
|
+
"content": {
|
|
240
|
+
"application/json": {
|
|
241
|
+
"schema": {
|
|
242
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"429": {
|
|
248
|
+
"description": "Rate limit exceeded. Wait before retrying.",
|
|
249
|
+
"x-lime-zh-CN": "请求超过限流窗口,等待后重试。",
|
|
250
|
+
"content": {
|
|
251
|
+
"application/json": {
|
|
252
|
+
"schema": {
|
|
253
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"headers": {
|
|
258
|
+
"Retry-After": {
|
|
259
|
+
"schema": {
|
|
260
|
+
"type": "integer"
|
|
261
|
+
},
|
|
262
|
+
"description": "Seconds before another attempt."
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"503": {
|
|
267
|
+
"description": "A required dependency is unavailable.",
|
|
268
|
+
"x-lime-zh-CN": "必要依赖暂时不可用。",
|
|
269
|
+
"content": {
|
|
270
|
+
"application/json": {
|
|
271
|
+
"schema": {
|
|
272
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"500": {
|
|
278
|
+
"description": "Protocol processing failed.",
|
|
279
|
+
"x-lime-zh-CN": "协议处理失败。",
|
|
280
|
+
"content": {
|
|
281
|
+
"application/json": {
|
|
282
|
+
"schema": {
|
|
283
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"/oauth/token": {
|
|
292
|
+
"post": {
|
|
293
|
+
"operationId": "identity_token",
|
|
294
|
+
"summary": "Exchange or refresh tokens",
|
|
295
|
+
"x-lime-summary-zh-CN": "兑换或刷新令牌",
|
|
296
|
+
"description": "Form-encoded request, not JSON. Public clients send client_id and no secret. Confidential and machine clients use client_secret_basic. Code+S256 is required for all authorization-code clients. Installation context is frozen before token exchange; installation_id, space_id, expected_generation and expected_release_id are rejected here. Responses are plain OAuth JSON, without a data envelope.",
|
|
297
|
+
"x-lime-zh-CN": "使用表单编码,不接收 JSON。公共客户端提交 client_id,不持有 Secret;机密与机器客户端使用 client_secret_basic。所有授权码客户端均要求 S256。安装上下文在兑换前冻结,此处拒绝 installation_id、space_id、expected_generation、expected_release_id。响应直接为 OAuth JSON,没有 data 包装。",
|
|
298
|
+
"tags": [
|
|
299
|
+
"Identity"
|
|
300
|
+
],
|
|
301
|
+
"security": [
|
|
302
|
+
{
|
|
303
|
+
"ClientSecretBasic": []
|
|
304
|
+
},
|
|
305
|
+
{}
|
|
306
|
+
],
|
|
307
|
+
"requestBody": {
|
|
308
|
+
"required": true,
|
|
309
|
+
"content": {
|
|
310
|
+
"application/x-www-form-urlencoded": {
|
|
311
|
+
"schema": {
|
|
312
|
+
"$ref": "#/components/schemas/TokenRequest"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"responses": {
|
|
318
|
+
"200": {
|
|
319
|
+
"description": "Tokens for the accepted grant.",
|
|
320
|
+
"x-lime-zh-CN": "已接受授权对应的令牌。",
|
|
321
|
+
"content": {
|
|
322
|
+
"application/json": {
|
|
323
|
+
"schema": {
|
|
324
|
+
"$ref": "#/components/schemas/TokenResponse"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"400": {
|
|
330
|
+
"description": "Invalid protocol request or grant. Device polling also uses this status for authorization_pending and slow_down.",
|
|
331
|
+
"x-lime-zh-CN": "协议请求或授权无效。设备轮询的 authorization_pending 和 slow_down 也使用此状态。",
|
|
332
|
+
"content": {
|
|
333
|
+
"application/json": {
|
|
334
|
+
"schema": {
|
|
335
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"401": {
|
|
341
|
+
"description": "Client authentication failed.",
|
|
342
|
+
"x-lime-zh-CN": "客户端认证失败。",
|
|
343
|
+
"content": {
|
|
344
|
+
"application/json": {
|
|
345
|
+
"schema": {
|
|
346
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"429": {
|
|
352
|
+
"description": "Rate limit exceeded. Wait before retrying.",
|
|
353
|
+
"x-lime-zh-CN": "请求超过限流窗口,等待后重试。",
|
|
354
|
+
"content": {
|
|
355
|
+
"application/json": {
|
|
356
|
+
"schema": {
|
|
357
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"headers": {
|
|
362
|
+
"Retry-After": {
|
|
363
|
+
"schema": {
|
|
364
|
+
"type": "integer"
|
|
365
|
+
},
|
|
366
|
+
"description": "Seconds before another attempt."
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"503": {
|
|
371
|
+
"description": "A required dependency is unavailable.",
|
|
372
|
+
"x-lime-zh-CN": "必要依赖暂时不可用。",
|
|
373
|
+
"content": {
|
|
374
|
+
"application/json": {
|
|
375
|
+
"schema": {
|
|
376
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"500": {
|
|
382
|
+
"description": "Protocol processing failed.",
|
|
383
|
+
"x-lime-zh-CN": "协议处理失败。",
|
|
384
|
+
"content": {
|
|
385
|
+
"application/json": {
|
|
386
|
+
"schema": {
|
|
387
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"/oauth/device/authorization": {
|
|
396
|
+
"post": {
|
|
397
|
+
"operationId": "identity_device_authorization",
|
|
398
|
+
"summary": "Start device authorization",
|
|
399
|
+
"x-lime-summary-zh-CN": "发起设备授权",
|
|
400
|
+
"description": "Use for devices that cannot complete a browser callback. Supports public or confidential user clients, not machine clients. Send client_id for public clients, or use HTTP Basic for confidential clients. Do not send PKCE fields. Show the returned verification URI and user code, then poll /oauth/token using the returned interval. The device code expires after 600 seconds.",
|
|
401
|
+
"x-lime-zh-CN": "用于无法完成浏览器回调的设备。支持公共或机密用户客户端,不支持机器客户端。公共客户端提交 client_id,机密客户端使用 HTTP Basic。不得传入 PKCE 字段。展示返回的验证地址与用户码,再按 interval 轮询 /oauth/token。设备码 600 秒后到期。",
|
|
402
|
+
"tags": [
|
|
403
|
+
"Identity"
|
|
404
|
+
],
|
|
405
|
+
"security": [
|
|
406
|
+
{
|
|
407
|
+
"ClientSecretBasic": []
|
|
408
|
+
},
|
|
409
|
+
{}
|
|
410
|
+
],
|
|
411
|
+
"requestBody": {
|
|
412
|
+
"required": true,
|
|
413
|
+
"content": {
|
|
414
|
+
"application/x-www-form-urlencoded": {
|
|
415
|
+
"schema": {
|
|
416
|
+
"$ref": "#/components/schemas/DeviceAuthorizationRequest"
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"responses": {
|
|
422
|
+
"200": {
|
|
423
|
+
"description": "Device authorization transaction.",
|
|
424
|
+
"x-lime-zh-CN": "设备授权事务。",
|
|
425
|
+
"content": {
|
|
426
|
+
"application/json": {
|
|
427
|
+
"schema": {
|
|
428
|
+
"$ref": "#/components/schemas/DeviceAuthorizationResponse"
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"400": {
|
|
434
|
+
"description": "Invalid protocol request or grant. Device polling also uses this status for authorization_pending and slow_down.",
|
|
435
|
+
"x-lime-zh-CN": "协议请求或授权无效。设备轮询的 authorization_pending 和 slow_down 也使用此状态。",
|
|
436
|
+
"content": {
|
|
437
|
+
"application/json": {
|
|
438
|
+
"schema": {
|
|
439
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
"401": {
|
|
445
|
+
"description": "Client authentication failed.",
|
|
446
|
+
"x-lime-zh-CN": "客户端认证失败。",
|
|
447
|
+
"content": {
|
|
448
|
+
"application/json": {
|
|
449
|
+
"schema": {
|
|
450
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"429": {
|
|
456
|
+
"description": "Rate limit exceeded. Wait before retrying.",
|
|
457
|
+
"x-lime-zh-CN": "请求超过限流窗口,等待后重试。",
|
|
458
|
+
"content": {
|
|
459
|
+
"application/json": {
|
|
460
|
+
"schema": {
|
|
461
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"headers": {
|
|
466
|
+
"Retry-After": {
|
|
467
|
+
"schema": {
|
|
468
|
+
"type": "integer"
|
|
469
|
+
},
|
|
470
|
+
"description": "Seconds before another attempt."
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"503": {
|
|
475
|
+
"description": "A required dependency is unavailable.",
|
|
476
|
+
"x-lime-zh-CN": "必要依赖暂时不可用。",
|
|
477
|
+
"content": {
|
|
478
|
+
"application/json": {
|
|
479
|
+
"schema": {
|
|
480
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
"500": {
|
|
486
|
+
"description": "Protocol processing failed.",
|
|
487
|
+
"x-lime-zh-CN": "协议处理失败。",
|
|
488
|
+
"content": {
|
|
489
|
+
"application/json": {
|
|
490
|
+
"schema": {
|
|
491
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
"/oauth/userinfo": {
|
|
500
|
+
"get": {
|
|
501
|
+
"operationId": "identity_userinfo",
|
|
502
|
+
"summary": "Read user information",
|
|
503
|
+
"x-lime-summary-zh-CN": "读取用户资料",
|
|
504
|
+
"description": "Requires an active user access token with openid. Optional profile and email scopes control returned fields. ID tokens and machine tokens are not valid UserInfo credentials. Installation claims are present only for a current bound grant.",
|
|
505
|
+
"x-lime-zh-CN": "要求当前有效且具有 openid 的用户访问令牌。profile 和 email 控制返回字段。ID Token 和机器令牌不能用于 UserInfo。仅当前有效绑定授权返回安装声明。",
|
|
506
|
+
"tags": [
|
|
507
|
+
"Identity"
|
|
508
|
+
],
|
|
509
|
+
"security": [
|
|
510
|
+
{
|
|
511
|
+
"Bearer": []
|
|
512
|
+
}
|
|
513
|
+
],
|
|
514
|
+
"responses": {
|
|
515
|
+
"200": {
|
|
516
|
+
"description": "Permitted user claims.",
|
|
517
|
+
"x-lime-zh-CN": "允许返回的用户声明。",
|
|
518
|
+
"content": {
|
|
519
|
+
"application/json": {
|
|
520
|
+
"schema": {
|
|
521
|
+
"$ref": "#/components/schemas/UserInfo"
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"401": {
|
|
527
|
+
"description": "Invalid or revoked token.",
|
|
528
|
+
"x-lime-zh-CN": "令牌无效或已撤销。",
|
|
529
|
+
"content": {
|
|
530
|
+
"application/json": {
|
|
531
|
+
"schema": {
|
|
532
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
"403": {
|
|
538
|
+
"description": "A user grant with the required scope is missing.",
|
|
539
|
+
"x-lime-zh-CN": "缺少要求的用户授权。",
|
|
540
|
+
"content": {
|
|
541
|
+
"application/json": {
|
|
542
|
+
"schema": {
|
|
543
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
"429": {
|
|
549
|
+
"description": "Rate limit exceeded. Wait before retrying.",
|
|
550
|
+
"x-lime-zh-CN": "请求超过限流窗口,等待后重试。",
|
|
551
|
+
"content": {
|
|
552
|
+
"application/json": {
|
|
553
|
+
"schema": {
|
|
554
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
"headers": {
|
|
559
|
+
"Retry-After": {
|
|
560
|
+
"schema": {
|
|
561
|
+
"type": "integer"
|
|
562
|
+
},
|
|
563
|
+
"description": "Seconds before another attempt."
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
"503": {
|
|
568
|
+
"description": "A required dependency is unavailable.",
|
|
569
|
+
"x-lime-zh-CN": "必要依赖暂时不可用。",
|
|
570
|
+
"content": {
|
|
571
|
+
"application/json": {
|
|
572
|
+
"schema": {
|
|
573
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
"500": {
|
|
579
|
+
"description": "Protocol processing failed.",
|
|
580
|
+
"x-lime-zh-CN": "协议处理失败。",
|
|
581
|
+
"content": {
|
|
582
|
+
"application/json": {
|
|
583
|
+
"schema": {
|
|
584
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
"post": {
|
|
592
|
+
"operationId": "identity_userinfo_post",
|
|
593
|
+
"summary": "Read user information",
|
|
594
|
+
"x-lime-summary-zh-CN": "读取用户资料",
|
|
595
|
+
"description": "Requires an active user access token with openid. Optional profile and email scopes control returned fields. ID tokens and machine tokens are not valid UserInfo credentials. Installation claims are present only for a current bound grant.",
|
|
596
|
+
"x-lime-zh-CN": "要求当前有效且具有 openid 的用户访问令牌。profile 和 email 控制返回字段。ID Token 和机器令牌不能用于 UserInfo。仅当前有效绑定授权返回安装声明。",
|
|
597
|
+
"tags": [
|
|
598
|
+
"Identity"
|
|
599
|
+
],
|
|
600
|
+
"security": [
|
|
601
|
+
{
|
|
602
|
+
"Bearer": []
|
|
603
|
+
}
|
|
604
|
+
],
|
|
605
|
+
"responses": {
|
|
606
|
+
"200": {
|
|
607
|
+
"description": "Permitted user claims.",
|
|
608
|
+
"x-lime-zh-CN": "允许返回的用户声明。",
|
|
609
|
+
"content": {
|
|
610
|
+
"application/json": {
|
|
611
|
+
"schema": {
|
|
612
|
+
"$ref": "#/components/schemas/UserInfo"
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
"401": {
|
|
618
|
+
"description": "Invalid or revoked token.",
|
|
619
|
+
"x-lime-zh-CN": "令牌无效或已撤销。",
|
|
620
|
+
"content": {
|
|
621
|
+
"application/json": {
|
|
622
|
+
"schema": {
|
|
623
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
"403": {
|
|
629
|
+
"description": "A user grant with the required scope is missing.",
|
|
630
|
+
"x-lime-zh-CN": "缺少要求的用户授权。",
|
|
631
|
+
"content": {
|
|
632
|
+
"application/json": {
|
|
633
|
+
"schema": {
|
|
634
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"429": {
|
|
640
|
+
"description": "Rate limit exceeded. Wait before retrying.",
|
|
641
|
+
"x-lime-zh-CN": "请求超过限流窗口,等待后重试。",
|
|
642
|
+
"content": {
|
|
643
|
+
"application/json": {
|
|
644
|
+
"schema": {
|
|
645
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
"headers": {
|
|
650
|
+
"Retry-After": {
|
|
651
|
+
"schema": {
|
|
652
|
+
"type": "integer"
|
|
653
|
+
},
|
|
654
|
+
"description": "Seconds before another attempt."
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
"503": {
|
|
659
|
+
"description": "A required dependency is unavailable.",
|
|
660
|
+
"x-lime-zh-CN": "必要依赖暂时不可用。",
|
|
661
|
+
"content": {
|
|
662
|
+
"application/json": {
|
|
663
|
+
"schema": {
|
|
664
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
"500": {
|
|
670
|
+
"description": "Protocol processing failed.",
|
|
671
|
+
"x-lime-zh-CN": "协议处理失败。",
|
|
672
|
+
"content": {
|
|
673
|
+
"application/json": {
|
|
674
|
+
"schema": {
|
|
675
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
},
|
|
683
|
+
"/oauth/jwks": {
|
|
684
|
+
"get": {
|
|
685
|
+
"operationId": "identity_jwks",
|
|
686
|
+
"summary": "Signing keys",
|
|
687
|
+
"x-lime-summary-zh-CN": "签名公钥",
|
|
688
|
+
"description": "Public RSA keys for verifying RS256 ID tokens. Match kid and refresh keys when an unknown kid appears. Fetch through an OIDC library; do not use access tokens as JWTs.",
|
|
689
|
+
"x-lime-zh-CN": "用于验证 RS256 ID Token 的公开 RSA 密钥。按 kid 匹配,未知 kid 时刷新。通过 OIDC 库获取;不得将访问令牌作为 JWT 解析。",
|
|
690
|
+
"tags": [
|
|
691
|
+
"Identity"
|
|
692
|
+
],
|
|
693
|
+
"security": [],
|
|
694
|
+
"responses": {
|
|
695
|
+
"200": {
|
|
696
|
+
"description": "Public signing keys.",
|
|
697
|
+
"x-lime-zh-CN": "公开签名密钥。",
|
|
698
|
+
"content": {
|
|
699
|
+
"application/json": {
|
|
700
|
+
"schema": {
|
|
701
|
+
"$ref": "#/components/schemas/JWKSet"
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
"/oauth/revoke": {
|
|
710
|
+
"post": {
|
|
711
|
+
"operationId": "identity_revoke",
|
|
712
|
+
"summary": "Revoke a token",
|
|
713
|
+
"x-lime-summary-zh-CN": "撤销令牌",
|
|
714
|
+
"description": "Authenticate as the issuing client. Public clients send client_id; confidential clients use HTTP Basic. A successful or already invalid token returns HTTP 200 with an empty body. This revokes an authorization token; it does not perform browser-wide central sign-out.",
|
|
715
|
+
"x-lime-zh-CN": "使用签发客户端身份认证。公共客户端提交 client_id,机密客户端使用 HTTP Basic。成功或令牌已无效均返回 HTTP 200 空正文。此操作撤销授权令牌,不执行浏览器中央退出。",
|
|
716
|
+
"tags": [
|
|
717
|
+
"Identity"
|
|
718
|
+
],
|
|
719
|
+
"security": [
|
|
720
|
+
{
|
|
721
|
+
"ClientSecretBasic": []
|
|
722
|
+
},
|
|
723
|
+
{}
|
|
724
|
+
],
|
|
725
|
+
"requestBody": {
|
|
726
|
+
"required": true,
|
|
727
|
+
"content": {
|
|
728
|
+
"application/x-www-form-urlencoded": {
|
|
729
|
+
"schema": {
|
|
730
|
+
"$ref": "#/components/schemas/TokenLookupRequest"
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
"responses": {
|
|
736
|
+
"200": {
|
|
737
|
+
"description": "Empty body; the request was accepted without revealing token existence.",
|
|
738
|
+
"x-lime-zh-CN": "空正文,接受请求且不泄露令牌是否存在。"
|
|
739
|
+
},
|
|
740
|
+
"400": {
|
|
741
|
+
"description": "Invalid protocol request or grant. Device polling also uses this status for authorization_pending and slow_down.",
|
|
742
|
+
"x-lime-zh-CN": "协议请求或授权无效。设备轮询的 authorization_pending 和 slow_down 也使用此状态。",
|
|
743
|
+
"content": {
|
|
744
|
+
"application/json": {
|
|
745
|
+
"schema": {
|
|
746
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
"401": {
|
|
752
|
+
"description": "Client authentication failed.",
|
|
753
|
+
"x-lime-zh-CN": "客户端认证失败。",
|
|
754
|
+
"content": {
|
|
755
|
+
"application/json": {
|
|
756
|
+
"schema": {
|
|
757
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
"429": {
|
|
763
|
+
"description": "Rate limit exceeded. Wait before retrying.",
|
|
764
|
+
"x-lime-zh-CN": "请求超过限流窗口,等待后重试。",
|
|
765
|
+
"content": {
|
|
766
|
+
"application/json": {
|
|
767
|
+
"schema": {
|
|
768
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
"headers": {
|
|
773
|
+
"Retry-After": {
|
|
774
|
+
"schema": {
|
|
775
|
+
"type": "integer"
|
|
776
|
+
},
|
|
777
|
+
"description": "Seconds before another attempt."
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
"503": {
|
|
782
|
+
"description": "A required dependency is unavailable.",
|
|
783
|
+
"x-lime-zh-CN": "必要依赖暂时不可用。",
|
|
784
|
+
"content": {
|
|
785
|
+
"application/json": {
|
|
786
|
+
"schema": {
|
|
787
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
},
|
|
792
|
+
"500": {
|
|
793
|
+
"description": "Protocol processing failed.",
|
|
794
|
+
"x-lime-zh-CN": "协议处理失败。",
|
|
795
|
+
"content": {
|
|
796
|
+
"application/json": {
|
|
797
|
+
"schema": {
|
|
798
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
"/oauth/introspect": {
|
|
807
|
+
"post": {
|
|
808
|
+
"operationId": "identity_introspect",
|
|
809
|
+
"summary": "Inspect a token",
|
|
810
|
+
"x-lime-summary-zh-CN": "检查令牌",
|
|
811
|
+
"description": "Server-side only; requires HTTP Basic with this client's secret. Only tokens issued to the same client can be active. Invalid, expired, revoked or other-client tokens return active=false. Public clients cannot use this endpoint.",
|
|
812
|
+
"x-lime-zh-CN": "仅供服务端使用,要求通过 HTTP Basic 认证当前客户端 Secret。仅同一客户端签发的令牌可返回有效。无效、过期、撤销或其他客户端令牌返回 active=false。公共客户端不能调用。",
|
|
813
|
+
"tags": [
|
|
814
|
+
"Identity"
|
|
815
|
+
],
|
|
816
|
+
"security": [
|
|
817
|
+
{
|
|
818
|
+
"ClientSecretBasic": []
|
|
819
|
+
}
|
|
820
|
+
],
|
|
821
|
+
"requestBody": {
|
|
822
|
+
"required": true,
|
|
823
|
+
"content": {
|
|
824
|
+
"application/x-www-form-urlencoded": {
|
|
825
|
+
"schema": {
|
|
826
|
+
"$ref": "#/components/schemas/TokenLookupRequest"
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
"responses": {
|
|
832
|
+
"200": {
|
|
833
|
+
"description": "Token activity and permitted metadata.",
|
|
834
|
+
"x-lime-zh-CN": "令牌有效性与允许的元数据。",
|
|
835
|
+
"content": {
|
|
836
|
+
"application/json": {
|
|
837
|
+
"schema": {
|
|
838
|
+
"$ref": "#/components/schemas/Introspection"
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
"400": {
|
|
844
|
+
"description": "Invalid protocol request or grant. Device polling also uses this status for authorization_pending and slow_down.",
|
|
845
|
+
"x-lime-zh-CN": "协议请求或授权无效。设备轮询的 authorization_pending 和 slow_down 也使用此状态。",
|
|
846
|
+
"content": {
|
|
847
|
+
"application/json": {
|
|
848
|
+
"schema": {
|
|
849
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
"401": {
|
|
855
|
+
"description": "Client authentication failed.",
|
|
856
|
+
"x-lime-zh-CN": "客户端认证失败。",
|
|
857
|
+
"content": {
|
|
858
|
+
"application/json": {
|
|
859
|
+
"schema": {
|
|
860
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
"429": {
|
|
866
|
+
"description": "Rate limit exceeded. Wait before retrying.",
|
|
867
|
+
"x-lime-zh-CN": "请求超过限流窗口,等待后重试。",
|
|
868
|
+
"content": {
|
|
869
|
+
"application/json": {
|
|
870
|
+
"schema": {
|
|
871
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
"headers": {
|
|
876
|
+
"Retry-After": {
|
|
877
|
+
"schema": {
|
|
878
|
+
"type": "integer"
|
|
879
|
+
},
|
|
880
|
+
"description": "Seconds before another attempt."
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
"503": {
|
|
885
|
+
"description": "A required dependency is unavailable.",
|
|
886
|
+
"x-lime-zh-CN": "必要依赖暂时不可用。",
|
|
887
|
+
"content": {
|
|
888
|
+
"application/json": {
|
|
889
|
+
"schema": {
|
|
890
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
"500": {
|
|
896
|
+
"description": "Protocol processing failed.",
|
|
897
|
+
"x-lime-zh-CN": "协议处理失败。",
|
|
898
|
+
"content": {
|
|
899
|
+
"application/json": {
|
|
900
|
+
"schema": {
|
|
901
|
+
"$ref": "#/components/schemas/OAuthError"
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
},
|
|
910
|
+
"components": {
|
|
911
|
+
"securitySchemes": {
|
|
912
|
+
"ClientSecretBasic": {
|
|
913
|
+
"type": "http",
|
|
914
|
+
"scheme": "basic",
|
|
915
|
+
"description": "client_secret_basic; form-encode the client ID and secret before constructing HTTP Basic."
|
|
916
|
+
},
|
|
917
|
+
"Bearer": {
|
|
918
|
+
"type": "http",
|
|
919
|
+
"scheme": "bearer",
|
|
920
|
+
"description": "Opaque user access token with openid."
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
"schemas": {
|
|
924
|
+
"OAuthError": {
|
|
925
|
+
"type": "object",
|
|
926
|
+
"properties": {
|
|
927
|
+
"error": {
|
|
928
|
+
"type": "string",
|
|
929
|
+
"description": "Stable OAuth error code. Device flow also returns authorization_pending, slow_down, access_denied and expired_token.",
|
|
930
|
+
"x-lime-zh-CN": "稳定 OAuth 错误码。设备流程还会返回 authorization_pending、slow_down、access_denied、expired_token。"
|
|
931
|
+
},
|
|
932
|
+
"error_description": {
|
|
933
|
+
"type": "string",
|
|
934
|
+
"description": "Optional human-readable detail. Use error for program logic.",
|
|
935
|
+
"x-lime-zh-CN": "可选的人类可读说明,程序判断应使用 error。"
|
|
936
|
+
},
|
|
937
|
+
"error_hint": {
|
|
938
|
+
"type": "string",
|
|
939
|
+
"description": "Optional recovery hint.",
|
|
940
|
+
"x-lime-zh-CN": "可选恢复提示。"
|
|
941
|
+
},
|
|
942
|
+
"error_uri": {
|
|
943
|
+
"type": "string",
|
|
944
|
+
"format": "uri"
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
"required": [
|
|
948
|
+
"error"
|
|
949
|
+
]
|
|
950
|
+
},
|
|
951
|
+
"AuthorizationCodeTokenRequest": {
|
|
952
|
+
"type": "object",
|
|
953
|
+
"properties": {
|
|
954
|
+
"grant_type": {
|
|
955
|
+
"type": "string",
|
|
956
|
+
"const": "authorization_code"
|
|
957
|
+
},
|
|
958
|
+
"client_id": {
|
|
959
|
+
"type": "string",
|
|
960
|
+
"description": "Client ID from Sign-in clients. Public clients send it in the form; confidential and machine clients authenticate with HTTP Basic.",
|
|
961
|
+
"x-lime-zh-CN": "来自登录客户端页面的 Client ID。公共客户端通过表单传入,机密与机器客户端使用 HTTP Basic。"
|
|
962
|
+
},
|
|
963
|
+
"code": {
|
|
964
|
+
"type": "string",
|
|
965
|
+
"description": "Single-use authorization code received at the registered redirect URI.",
|
|
966
|
+
"x-lime-zh-CN": "登记回调收到的一次性授权码。"
|
|
967
|
+
},
|
|
968
|
+
"redirect_uri": {
|
|
969
|
+
"type": "string",
|
|
970
|
+
"description": "Exactly the redirect_uri sent in the authorization request.",
|
|
971
|
+
"x-lime-zh-CN": "须与授权请求中的 redirect_uri 完全一致。",
|
|
972
|
+
"format": "uri"
|
|
973
|
+
},
|
|
974
|
+
"code_verifier": {
|
|
975
|
+
"type": "string",
|
|
976
|
+
"description": "Original random PKCE verifier. Never send the verifier to the authorization endpoint.",
|
|
977
|
+
"x-lime-zh-CN": "原始随机 PKCE verifier,不得将其发往授权端点。",
|
|
978
|
+
"minLength": 43,
|
|
979
|
+
"maxLength": 128
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
"required": [
|
|
983
|
+
"grant_type",
|
|
984
|
+
"code",
|
|
985
|
+
"redirect_uri",
|
|
986
|
+
"code_verifier"
|
|
987
|
+
]
|
|
988
|
+
},
|
|
989
|
+
"RefreshTokenRequest": {
|
|
990
|
+
"type": "object",
|
|
991
|
+
"properties": {
|
|
992
|
+
"grant_type": {
|
|
993
|
+
"type": "string",
|
|
994
|
+
"const": "refresh_token"
|
|
995
|
+
},
|
|
996
|
+
"client_id": {
|
|
997
|
+
"type": "string",
|
|
998
|
+
"description": "Client ID from Sign-in clients. Public clients send it in the form; confidential and machine clients authenticate with HTTP Basic.",
|
|
999
|
+
"x-lime-zh-CN": "来自登录客户端页面的 Client ID。公共客户端通过表单传入,机密与机器客户端使用 HTTP Basic。"
|
|
1000
|
+
},
|
|
1001
|
+
"refresh_token": {
|
|
1002
|
+
"type": "string",
|
|
1003
|
+
"description": "Latest refresh token. Serialize refreshes and atomically replace the stored token after success; do not reuse an old token after an uncertain result.",
|
|
1004
|
+
"x-lime-zh-CN": "最新刷新令牌。串行刷新并在成功后原子替换保存值;结果不明时不得重用旧令牌。"
|
|
1005
|
+
},
|
|
1006
|
+
"scope": {
|
|
1007
|
+
"type": "string",
|
|
1008
|
+
"description": "Optional subset of the original grant; cannot add scopes.",
|
|
1009
|
+
"x-lime-zh-CN": "可选的原授权权限子集,不得扩权。"
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
"required": [
|
|
1013
|
+
"grant_type",
|
|
1014
|
+
"refresh_token"
|
|
1015
|
+
]
|
|
1016
|
+
},
|
|
1017
|
+
"DeviceTokenRequest": {
|
|
1018
|
+
"type": "object",
|
|
1019
|
+
"properties": {
|
|
1020
|
+
"grant_type": {
|
|
1021
|
+
"type": "string",
|
|
1022
|
+
"const": "urn:ietf:params:oauth:grant-type:device_code"
|
|
1023
|
+
},
|
|
1024
|
+
"client_id": {
|
|
1025
|
+
"type": "string",
|
|
1026
|
+
"description": "Client ID from Sign-in clients. Public clients send it in the form; confidential and machine clients authenticate with HTTP Basic.",
|
|
1027
|
+
"x-lime-zh-CN": "来自登录客户端页面的 Client ID。公共客户端通过表单传入,机密与机器客户端使用 HTTP Basic。"
|
|
1028
|
+
},
|
|
1029
|
+
"device_code": {
|
|
1030
|
+
"type": "string",
|
|
1031
|
+
"description": "Device code from device authorization. Poll at interval; add 5 seconds after each slow_down. Stop on success, denial or expiry.",
|
|
1032
|
+
"x-lime-zh-CN": "设备授权返回的 device_code。按 interval 轮询;每次 slow_down 增加 5 秒。成功、拒绝或到期后停止。",
|
|
1033
|
+
"minLength": 43,
|
|
1034
|
+
"maxLength": 43
|
|
1035
|
+
}
|
|
1036
|
+
},
|
|
1037
|
+
"required": [
|
|
1038
|
+
"grant_type",
|
|
1039
|
+
"device_code"
|
|
1040
|
+
]
|
|
1041
|
+
},
|
|
1042
|
+
"MachineTokenRequest": {
|
|
1043
|
+
"type": "object",
|
|
1044
|
+
"properties": {
|
|
1045
|
+
"grant_type": {
|
|
1046
|
+
"type": "string",
|
|
1047
|
+
"const": "client_credentials"
|
|
1048
|
+
},
|
|
1049
|
+
"audience": {
|
|
1050
|
+
"type": "array",
|
|
1051
|
+
"items": {
|
|
1052
|
+
"type": "string"
|
|
1053
|
+
},
|
|
1054
|
+
"description": "Optional registered audiences. Repeat the form field for multiple audiences; unregistered values are rejected.",
|
|
1055
|
+
"x-lime-zh-CN": "可选的已登记 Audience。多个值须重复表单字段,未登记值会被拒绝。"
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
"required": [
|
|
1059
|
+
"grant_type"
|
|
1060
|
+
],
|
|
1061
|
+
"description": "Machine clients only. No user scopes, user identity or generic business API access is granted.",
|
|
1062
|
+
"x-lime-zh-CN": "仅限机器客户端,不授予用户权限、用户身份或通用业务 API 访问权。"
|
|
1063
|
+
},
|
|
1064
|
+
"TokenResponse": {
|
|
1065
|
+
"type": "object",
|
|
1066
|
+
"properties": {
|
|
1067
|
+
"access_token": {
|
|
1068
|
+
"type": "string",
|
|
1069
|
+
"description": "Opaque bearer token. Do not parse it as an ID token or send it in a URL.",
|
|
1070
|
+
"x-lime-zh-CN": "不透明 Bearer 令牌,不作为 ID Token 解析,也不得放入 URL。"
|
|
1071
|
+
},
|
|
1072
|
+
"token_type": {
|
|
1073
|
+
"type": "string"
|
|
1074
|
+
},
|
|
1075
|
+
"expires_in": {
|
|
1076
|
+
"type": "integer",
|
|
1077
|
+
"description": "Access token lifetime in seconds. Use the response value.",
|
|
1078
|
+
"x-lime-zh-CN": "访问令牌有效秒数,以响应为准。",
|
|
1079
|
+
"minimum": 0
|
|
1080
|
+
},
|
|
1081
|
+
"scope": {
|
|
1082
|
+
"type": "string",
|
|
1083
|
+
"description": "Granted scopes, separated by spaces.",
|
|
1084
|
+
"x-lime-zh-CN": "实际授予的权限,以空格分隔。"
|
|
1085
|
+
},
|
|
1086
|
+
"refresh_token": {
|
|
1087
|
+
"type": "string",
|
|
1088
|
+
"description": "Rotating token, returned only for an eligible user grant with offline_access.",
|
|
1089
|
+
"x-lime-zh-CN": "轮换刷新令牌,仅符合条件且具有 offline_access 的用户授权返回。"
|
|
1090
|
+
},
|
|
1091
|
+
"id_token": {
|
|
1092
|
+
"type": "string",
|
|
1093
|
+
"description": "RS256-signed ID token for an OpenID Connect user grant. Validate issuer, audience, signature, expiry and nonce with an OIDC library.",
|
|
1094
|
+
"x-lime-zh-CN": "OIDC 用户授权的 RS256 签名 ID Token。使用 OIDC 库校验 issuer、audience、签名、有效期和 nonce。"
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
"required": [
|
|
1098
|
+
"access_token",
|
|
1099
|
+
"token_type",
|
|
1100
|
+
"expires_in"
|
|
1101
|
+
]
|
|
1102
|
+
},
|
|
1103
|
+
"DeviceAuthorizationRequest": {
|
|
1104
|
+
"type": "object",
|
|
1105
|
+
"properties": {
|
|
1106
|
+
"client_id": {
|
|
1107
|
+
"type": "string",
|
|
1108
|
+
"description": "Client ID from Sign-in clients. Public clients send it in the form; confidential and machine clients authenticate with HTTP Basic.",
|
|
1109
|
+
"x-lime-zh-CN": "来自登录客户端页面的 Client ID。公共客户端通过表单传入,机密与机器客户端使用 HTTP Basic。"
|
|
1110
|
+
},
|
|
1111
|
+
"scope": {
|
|
1112
|
+
"type": "string",
|
|
1113
|
+
"description": "Space-separated scopes registered on this client. openid is required for sign-in; profile, email and offline_access are optional.",
|
|
1114
|
+
"x-lime-zh-CN": "客户端已登记的权限,以空格分隔。登录须含 openid,可选 profile、email、offline_access。"
|
|
1115
|
+
},
|
|
1116
|
+
"installation_id": {
|
|
1117
|
+
"type": "string",
|
|
1118
|
+
"description": "Production installation ID. Supply together with space_id when authorizing an enterprise installation.",
|
|
1119
|
+
"x-lime-zh-CN": "生产安装 ID。授权企业安装时须与 space_id 同时传入。",
|
|
1120
|
+
"maxLength": 40
|
|
1121
|
+
},
|
|
1122
|
+
"space_id": {
|
|
1123
|
+
"type": "string",
|
|
1124
|
+
"description": "Workspace containing the installation. This does not select a global current workspace.",
|
|
1125
|
+
"x-lime-zh-CN": "安装所属的工作空间,不用于选择全局当前空间。",
|
|
1126
|
+
"maxLength": 40
|
|
1127
|
+
}
|
|
1128
|
+
},
|
|
1129
|
+
"required": []
|
|
1130
|
+
},
|
|
1131
|
+
"DeviceAuthorizationResponse": {
|
|
1132
|
+
"type": "object",
|
|
1133
|
+
"properties": {
|
|
1134
|
+
"device_code": {
|
|
1135
|
+
"type": "string",
|
|
1136
|
+
"description": "Secret device code. Keep on the requesting device.",
|
|
1137
|
+
"x-lime-zh-CN": "保密设备码,仅留在发起请求的设备。"
|
|
1138
|
+
},
|
|
1139
|
+
"user_code": {
|
|
1140
|
+
"type": "string",
|
|
1141
|
+
"description": "Code shown to the user for entry on the verification page.",
|
|
1142
|
+
"x-lime-zh-CN": "供用户在验证页输入的短码。"
|
|
1143
|
+
},
|
|
1144
|
+
"verification_uri": {
|
|
1145
|
+
"type": "string",
|
|
1146
|
+
"format": "uri"
|
|
1147
|
+
},
|
|
1148
|
+
"verification_uri_complete": {
|
|
1149
|
+
"type": "string",
|
|
1150
|
+
"format": "uri"
|
|
1151
|
+
},
|
|
1152
|
+
"expires_in": {
|
|
1153
|
+
"type": "integer",
|
|
1154
|
+
"description": "Device code lifetime in seconds.",
|
|
1155
|
+
"x-lime-zh-CN": "设备码有效秒数。"
|
|
1156
|
+
},
|
|
1157
|
+
"interval": {
|
|
1158
|
+
"type": "integer",
|
|
1159
|
+
"description": "Minimum polling interval in seconds.",
|
|
1160
|
+
"x-lime-zh-CN": "最小轮询间隔秒数。"
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
"required": [
|
|
1164
|
+
"device_code",
|
|
1165
|
+
"user_code",
|
|
1166
|
+
"verification_uri",
|
|
1167
|
+
"verification_uri_complete",
|
|
1168
|
+
"expires_in",
|
|
1169
|
+
"interval"
|
|
1170
|
+
]
|
|
1171
|
+
},
|
|
1172
|
+
"TokenLookupRequest": {
|
|
1173
|
+
"type": "object",
|
|
1174
|
+
"properties": {
|
|
1175
|
+
"client_id": {
|
|
1176
|
+
"type": "string",
|
|
1177
|
+
"description": "Client ID from Sign-in clients. Public clients send it in the form; confidential and machine clients authenticate with HTTP Basic.",
|
|
1178
|
+
"x-lime-zh-CN": "来自登录客户端页面的 Client ID。公共客户端通过表单传入,机密与机器客户端使用 HTTP Basic。"
|
|
1179
|
+
},
|
|
1180
|
+
"token": {
|
|
1181
|
+
"type": "string",
|
|
1182
|
+
"description": "Token to revoke or inspect. Never include it in a URL.",
|
|
1183
|
+
"x-lime-zh-CN": "待撤销或检查的令牌,不得包含在 URL 中。"
|
|
1184
|
+
},
|
|
1185
|
+
"token_type_hint": {
|
|
1186
|
+
"type": "string",
|
|
1187
|
+
"enum": [
|
|
1188
|
+
"access_token",
|
|
1189
|
+
"refresh_token"
|
|
1190
|
+
]
|
|
1191
|
+
}
|
|
1192
|
+
},
|
|
1193
|
+
"required": [
|
|
1194
|
+
"token"
|
|
1195
|
+
]
|
|
1196
|
+
},
|
|
1197
|
+
"UserInfo": {
|
|
1198
|
+
"type": "object",
|
|
1199
|
+
"properties": {
|
|
1200
|
+
"sub": {
|
|
1201
|
+
"type": "string",
|
|
1202
|
+
"description": "Pairwise subject for this client sector; not a platform-wide user ID.",
|
|
1203
|
+
"x-lime-zh-CN": "客户端 sector 范围内的成对主体标识,不是平台全局用户 ID。"
|
|
1204
|
+
},
|
|
1205
|
+
"name": {
|
|
1206
|
+
"type": "string",
|
|
1207
|
+
"description": "Present only when profile was granted.",
|
|
1208
|
+
"x-lime-zh-CN": "仅授予 profile 时返回。"
|
|
1209
|
+
},
|
|
1210
|
+
"email": {
|
|
1211
|
+
"type": "string",
|
|
1212
|
+
"description": "Present only when email was granted.",
|
|
1213
|
+
"x-lime-zh-CN": "仅授予 email 时返回。",
|
|
1214
|
+
"format": "email"
|
|
1215
|
+
},
|
|
1216
|
+
"email_verified": {
|
|
1217
|
+
"type": "boolean"
|
|
1218
|
+
},
|
|
1219
|
+
"lime_installation_id": {
|
|
1220
|
+
"type": "string",
|
|
1221
|
+
"description": "Present only for a current installation-bound grant.",
|
|
1222
|
+
"x-lime-zh-CN": "仅当前有效的安装绑定授权返回。"
|
|
1223
|
+
},
|
|
1224
|
+
"lime_space_id": {
|
|
1225
|
+
"type": "string"
|
|
1226
|
+
},
|
|
1227
|
+
"lime_release_id": {
|
|
1228
|
+
"type": "string"
|
|
1229
|
+
},
|
|
1230
|
+
"lime_installation_generation": {
|
|
1231
|
+
"type": "integer"
|
|
1232
|
+
}
|
|
1233
|
+
},
|
|
1234
|
+
"required": [
|
|
1235
|
+
"sub"
|
|
1236
|
+
]
|
|
1237
|
+
},
|
|
1238
|
+
"Introspection": {
|
|
1239
|
+
"type": "object",
|
|
1240
|
+
"properties": {
|
|
1241
|
+
"active": {
|
|
1242
|
+
"type": "boolean"
|
|
1243
|
+
},
|
|
1244
|
+
"client_id": {
|
|
1245
|
+
"type": "string"
|
|
1246
|
+
},
|
|
1247
|
+
"sub": {
|
|
1248
|
+
"type": "string"
|
|
1249
|
+
},
|
|
1250
|
+
"scope": {
|
|
1251
|
+
"type": "string"
|
|
1252
|
+
},
|
|
1253
|
+
"exp": {
|
|
1254
|
+
"type": "integer"
|
|
1255
|
+
},
|
|
1256
|
+
"iat": {
|
|
1257
|
+
"type": "integer"
|
|
1258
|
+
},
|
|
1259
|
+
"aud": {
|
|
1260
|
+
"type": "array",
|
|
1261
|
+
"items": {
|
|
1262
|
+
"type": "string"
|
|
1263
|
+
}
|
|
1264
|
+
},
|
|
1265
|
+
"lime_installation_id": {
|
|
1266
|
+
"type": "string"
|
|
1267
|
+
},
|
|
1268
|
+
"lime_space_id": {
|
|
1269
|
+
"type": "string"
|
|
1270
|
+
},
|
|
1271
|
+
"lime_release_id": {
|
|
1272
|
+
"type": "string"
|
|
1273
|
+
},
|
|
1274
|
+
"lime_installation_generation": {
|
|
1275
|
+
"type": "integer"
|
|
1276
|
+
}
|
|
1277
|
+
},
|
|
1278
|
+
"required": [
|
|
1279
|
+
"active"
|
|
1280
|
+
]
|
|
1281
|
+
},
|
|
1282
|
+
"JWK": {
|
|
1283
|
+
"type": "object",
|
|
1284
|
+
"properties": {
|
|
1285
|
+
"kty": {
|
|
1286
|
+
"type": "string",
|
|
1287
|
+
"const": "RSA"
|
|
1288
|
+
},
|
|
1289
|
+
"use": {
|
|
1290
|
+
"type": "string",
|
|
1291
|
+
"const": "sig"
|
|
1292
|
+
},
|
|
1293
|
+
"alg": {
|
|
1294
|
+
"type": "string",
|
|
1295
|
+
"const": "RS256"
|
|
1296
|
+
},
|
|
1297
|
+
"kid": {
|
|
1298
|
+
"type": "string"
|
|
1299
|
+
},
|
|
1300
|
+
"n": {
|
|
1301
|
+
"type": "string"
|
|
1302
|
+
},
|
|
1303
|
+
"e": {
|
|
1304
|
+
"type": "string"
|
|
1305
|
+
}
|
|
1306
|
+
},
|
|
1307
|
+
"required": [
|
|
1308
|
+
"kty",
|
|
1309
|
+
"kid",
|
|
1310
|
+
"n",
|
|
1311
|
+
"e"
|
|
1312
|
+
]
|
|
1313
|
+
},
|
|
1314
|
+
"JWKSet": {
|
|
1315
|
+
"type": "object",
|
|
1316
|
+
"properties": {
|
|
1317
|
+
"keys": {
|
|
1318
|
+
"type": "array",
|
|
1319
|
+
"items": {
|
|
1320
|
+
"$ref": "#/components/schemas/JWK"
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
"required": [
|
|
1325
|
+
"keys"
|
|
1326
|
+
]
|
|
1327
|
+
},
|
|
1328
|
+
"Discovery": {
|
|
1329
|
+
"type": "object",
|
|
1330
|
+
"properties": {
|
|
1331
|
+
"issuer": {
|
|
1332
|
+
"type": "string",
|
|
1333
|
+
"format": "uri"
|
|
1334
|
+
},
|
|
1335
|
+
"authorization_endpoint": {
|
|
1336
|
+
"type": "string",
|
|
1337
|
+
"format": "uri"
|
|
1338
|
+
},
|
|
1339
|
+
"token_endpoint": {
|
|
1340
|
+
"type": "string",
|
|
1341
|
+
"format": "uri"
|
|
1342
|
+
},
|
|
1343
|
+
"userinfo_endpoint": {
|
|
1344
|
+
"type": "string",
|
|
1345
|
+
"format": "uri"
|
|
1346
|
+
},
|
|
1347
|
+
"jwks_uri": {
|
|
1348
|
+
"type": "string",
|
|
1349
|
+
"format": "uri"
|
|
1350
|
+
},
|
|
1351
|
+
"revocation_endpoint": {
|
|
1352
|
+
"type": "string",
|
|
1353
|
+
"format": "uri"
|
|
1354
|
+
},
|
|
1355
|
+
"introspection_endpoint": {
|
|
1356
|
+
"type": "string",
|
|
1357
|
+
"format": "uri"
|
|
1358
|
+
},
|
|
1359
|
+
"device_authorization_endpoint": {
|
|
1360
|
+
"type": "string",
|
|
1361
|
+
"format": "uri"
|
|
1362
|
+
},
|
|
1363
|
+
"response_types_supported": {
|
|
1364
|
+
"type": "array",
|
|
1365
|
+
"items": {
|
|
1366
|
+
"type": "string"
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
"response_modes_supported": {
|
|
1370
|
+
"type": "array",
|
|
1371
|
+
"items": {
|
|
1372
|
+
"type": "string"
|
|
1373
|
+
}
|
|
1374
|
+
},
|
|
1375
|
+
"grant_types_supported": {
|
|
1376
|
+
"type": "array",
|
|
1377
|
+
"items": {
|
|
1378
|
+
"type": "string"
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
"subject_types_supported": {
|
|
1382
|
+
"type": "array",
|
|
1383
|
+
"items": {
|
|
1384
|
+
"type": "string"
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
"id_token_signing_alg_values_supported": {
|
|
1388
|
+
"type": "array",
|
|
1389
|
+
"items": {
|
|
1390
|
+
"type": "string"
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
"token_endpoint_auth_methods_supported": {
|
|
1394
|
+
"type": "array",
|
|
1395
|
+
"items": {
|
|
1396
|
+
"type": "string"
|
|
1397
|
+
}
|
|
1398
|
+
},
|
|
1399
|
+
"code_challenge_methods_supported": {
|
|
1400
|
+
"type": "array",
|
|
1401
|
+
"items": {
|
|
1402
|
+
"type": "string"
|
|
1403
|
+
}
|
|
1404
|
+
},
|
|
1405
|
+
"scopes_supported": {
|
|
1406
|
+
"type": "array",
|
|
1407
|
+
"items": {
|
|
1408
|
+
"type": "string"
|
|
1409
|
+
}
|
|
1410
|
+
},
|
|
1411
|
+
"claims_supported": {
|
|
1412
|
+
"type": "array",
|
|
1413
|
+
"items": {
|
|
1414
|
+
"type": "string"
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
},
|
|
1418
|
+
"required": [
|
|
1419
|
+
"issuer",
|
|
1420
|
+
"authorization_endpoint",
|
|
1421
|
+
"token_endpoint",
|
|
1422
|
+
"userinfo_endpoint",
|
|
1423
|
+
"jwks_uri"
|
|
1424
|
+
]
|
|
1425
|
+
},
|
|
1426
|
+
"TokenRequest": {
|
|
1427
|
+
"oneOf": [
|
|
1428
|
+
{
|
|
1429
|
+
"$ref": "#/components/schemas/AuthorizationCodeTokenRequest"
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
"$ref": "#/components/schemas/RefreshTokenRequest"
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
"$ref": "#/components/schemas/DeviceTokenRequest"
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
"$ref": "#/components/schemas/MachineTokenRequest"
|
|
1439
|
+
}
|
|
1440
|
+
],
|
|
1441
|
+
"discriminator": {
|
|
1442
|
+
"propertyName": "grant_type",
|
|
1443
|
+
"mapping": {
|
|
1444
|
+
"authorization_code": "#/components/schemas/AuthorizationCodeTokenRequest",
|
|
1445
|
+
"refresh_token": "#/components/schemas/RefreshTokenRequest",
|
|
1446
|
+
"urn:ietf:params:oauth:grant-type:device_code": "#/components/schemas/DeviceTokenRequest",
|
|
1447
|
+
"client_credentials": "#/components/schemas/MachineTokenRequest"
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
}
|