@meshery/schemas 1.3.110 → 1.3.112
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/dist/cloudApi.d.mts +5059 -4415
- package/dist/cloudApi.d.ts +5059 -4415
- package/dist/cloudApi.js +1 -1
- package/dist/cloudApi.mjs +1 -1
- package/dist/constructs/v1beta3/oauth_consent/OauthConsent.d.ts +466 -0
- package/dist/constructs/v1beta3/oauth_consent/OauthConsent.js +1 -0
- package/dist/constructs/v1beta3/oauth_consent/OauthConsent.mjs +0 -0
- package/dist/constructs/v1beta3/oauth_consent/OauthConsentSchema.d.ts +2 -0
- package/dist/constructs/v1beta3/oauth_consent/OauthConsentSchema.js +199 -0
- package/dist/constructs/v1beta3/oauth_consent/OauthConsentSchema.mjs +199 -0
- package/dist/constructs/v1beta3/token/Token.d.ts +216 -11
- package/dist/constructs/v1beta3/token/TokenSchema.js +3 -3
- package/dist/constructs/v1beta3/token/TokenSchema.mjs +3 -3
- package/dist/constructs/v1beta3/user/User.d.ts +222 -2
- package/dist/constructs/v1beta3/user/UserSchema.js +1 -1
- package/dist/constructs/v1beta3/user/UserSchema.mjs +1 -1
- package/dist/index.d.mts +85 -2
- package/dist/index.d.ts +85 -2
- package/dist/mesheryApi.d.mts +1 -1
- package/dist/mesheryApi.d.ts +1 -1
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ export interface paths {
|
|
|
19
19
|
put?: never;
|
|
20
20
|
/**
|
|
21
21
|
* Generate token
|
|
22
|
-
* @description Generates a token for the authenticated user.
|
|
22
|
+
* @description Generates a token for the authenticated user. `name` and `purpose` are query parameters, as before. The optional body (`TokenCreatePayload`) limits the token: `keychainIds` restricts it to the keys of those keychains, and `expiresAt` ends its life. Omit the body, or both fields, for an unrestricted token that never expires. An unknown keychain ID, an explicit empty `keychainIds`, an `expiresAt` in the past, or a keychain the caller cannot see is refused with 400. A request authenticated with a keychain-scoped token (`keychainScoped` true, or a non-empty `keychainIds`) answers 403 and mints nothing, whatever the body. A session or unrestricted token is unchanged. See docs/token-scoping-contract.md.
|
|
23
23
|
*/
|
|
24
24
|
post: operations["generateToken"];
|
|
25
25
|
/**
|
|
@@ -61,7 +61,7 @@ export interface paths {
|
|
|
61
61
|
};
|
|
62
62
|
/**
|
|
63
63
|
* Issue indefinite lifetime token
|
|
64
|
-
* @description Creates a non-expiring user token for provider admin use cases.
|
|
64
|
+
* @description Creates a non-expiring user token for provider admin use cases. A request authenticated with a keychain-scoped token (`keychainScoped` true, or a non-empty `keychainIds`) answers 403 and mints nothing, whatever the query. A session or unrestricted token is unchanged. See docs/token-scoping-contract.md.
|
|
65
65
|
*/
|
|
66
66
|
get: operations["issueIndefiniteLifetimeToken"];
|
|
67
67
|
put?: never;
|
|
@@ -81,7 +81,7 @@ export interface paths {
|
|
|
81
81
|
};
|
|
82
82
|
/**
|
|
83
83
|
* Authorize native client sign-in
|
|
84
|
-
* @description Browser-facing step of the native client sign-in flow (RFC 8252 loopback redirect with RFC 7636 PKCE). Requires the session cookie of a signed-in user and the Create Token permission. Validates the request. When the request names the client application (`client`) and its version (`clientVersion`) and that version is below the provider minimum, it renders the update page with status 426 and issues nothing. Otherwise it stores a single-use authorization code that expires after 60 seconds, bound to the user, the client name and the PKCE code challenge, and redirects the browser to http://127.0.0.1:{port}/callback with code and state query parameters. Only the 127.0.0.1 loopback IP literal is ever used; no token or cookie is placed in the redirect; no consent page is shown.
|
|
84
|
+
* @description Browser-facing step of the native client sign-in flow (RFC 8252 loopback redirect with RFC 7636 PKCE). Requires the session cookie of a signed-in user and the Create Token permission. Validates the request. When the request names the client application (`client`) and its version (`clientVersion`) and that version is below the provider minimum, it renders the update page with status 426 and issues nothing. Otherwise it stores a single-use authorization code that expires after 60 seconds, bound to the user, the client name and the PKCE code challenge, and redirects the browser to http://127.0.0.1:{port}/callback with code and state query parameters. Only the 127.0.0.1 loopback IP literal is ever used; no token or cookie is placed in the redirect; no consent page is shown. A request authenticated with a keychain-scoped token (`keychainScoped` true, or a non-empty `keychainIds`) answers 403 and mints nothing, including no authorization code, whatever the query. A session or unrestricted token is unchanged. See docs/token-scoping-contract.md.
|
|
85
85
|
*/
|
|
86
86
|
get: operations["getNativeClientAuthorization"];
|
|
87
87
|
put?: never;
|
|
@@ -123,7 +123,7 @@ export interface paths {
|
|
|
123
123
|
put?: never;
|
|
124
124
|
/**
|
|
125
125
|
* Revoke token
|
|
126
|
-
* @description Revokes an OAuth access or refresh token issued by the identity provider, for example when an OAuth client signs out, or a user-created API token (the token envelope that generateToken returns, or the bare JWT inside it). Possessing the token is the credential, so no session or bearer token is required. The server first checks whether `token` is a user-created API token whose signature verifies. If it is, the server retires it locally, scoped to the owner named in the token, exactly as deleteUserToken does, and evicts cached introspection results so the token stops authenticating immediately. Any other token is forwarded to the OAuth2 server's RFC 7009 revocation endpoint with the server's own client credentials. On
|
|
126
|
+
* @description Revokes an OAuth access or refresh token issued by the identity provider, for example when an OAuth client signs out, or a user-created API token (the token envelope that generateToken returns, or the bare JWT inside it). Possessing the token is the credential, so no session or bearer token is required. The server first checks whether `token` is a user-created API token whose signature verifies. If it is, the server retires it locally, scoped to the owner named in the token, exactly as deleteUserToken does, and evicts cached introspection results so the token stops authenticating immediately. A token issued to a third-party OAuth client (any client other than the server's own) ends that user's whole grant to that client, revoking every access and refresh token it minted. Any other token is forwarded to the OAuth2 server's RFC 7009 revocation endpoint with the server's own client credentials, which revokes that token and the tokens issued alongside it from the same authorization. On every path an unknown, anonymous or already-revoked token is a no-op that still answers 200, so the answer reveals nothing about validity. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is one of "Error reading token payload", "Error decoding token" or "missing token". A 503 body is "token revocation status is temporarily unavailable" when signing keys (JWKS) or the token store cannot be read, or when the OAuth2 server cannot be asked who the token belongs to; the token was not revoked and the caller should retry. A 500 body is "Error revoking token at the moment", answered when the revocation call itself fails: the OAuth2 server's revocation returns an error response or cannot be reached.
|
|
127
127
|
*/
|
|
128
128
|
post: operations["revokeToken"];
|
|
129
129
|
delete?: never;
|
|
@@ -143,7 +143,7 @@ export interface paths {
|
|
|
143
143
|
put?: never;
|
|
144
144
|
/**
|
|
145
145
|
* Introspect access token
|
|
146
|
-
* @description Reports whether an access token (a JWT) is authentic, unexpired and
|
|
146
|
+
* @description Reports whether an access token (a JWT) is authentic, unexpired, not revoked and issued for a protected resource, and on success describes it. Possessing the token is the credential, so no session or bearer token is required. `resource` names the protected resource asking (an RFC 8707 resource identifier, as published in that resource's RFC 9728 protected resource metadata); omitted, it is the REST API. The server is the single decider: a token the server issued to its own first-party clients (a personal API token, a native sign-in token, a first-party sign-in session) is valid for every protected resource the server issues tokens for; a token issued to a third-party OAuth client is valid only for a resource its `aud` names. An inactive or refused token is answered with a 401, not with RFC 7662 section 2.2's 200 and `active: false`: this is the server's status API, and existing callers read only the status. The server trims whitespace from `token`. The server reads only the first 1 MiB (1048576 bytes) of the body and ignores the rest; JSON that does not complete within it fails to decode (400). A 400 body is "Error reading token payload" or "Error decoding token" (also answered when `token` is missing or empty), or "invalid_target" when `resource` is not a protected resource this server issues tokens for. A 401 body is "invalid access token" when the signature or expiry check fails, "revoked access token used" when the token has been revoked, or "token audience does not include the requested resource". A caller that sends `resource` takes the 200 as the server's decision for that resource - `aud` is [] for a first-party token that is valid everywhere, so a caller must not re-derive the decision from it - and must refuse the token when the 200 carries no body: a server that predates `resource` ignores it and answers 200 with an empty body for any valid token.
|
|
147
147
|
*/
|
|
148
148
|
post: operations["introspectToken"];
|
|
149
149
|
delete?: never;
|
|
@@ -176,7 +176,7 @@ export interface paths {
|
|
|
176
176
|
export type webhooks = Record<string, never>;
|
|
177
177
|
export interface components {
|
|
178
178
|
schemas: {
|
|
179
|
-
/** @description Represents a user-owned API token or OAuth session. */
|
|
179
|
+
/** @description Represents a user-owned API token or OAuth session. A token may carry two optional limits. `keychainIds` restricts which keys it may use, and `expiresAt` ends its life. A token with neither is unrestricted and never expires, which is what every token issued before these fields existed is. A token with neither limit set is unrestricted only when keychainScoped is false or absent. `keychainScoped` is the server's stored record of whether the token is limited to its keychains' keys. See the token scoping contract in docs/token-scoping-contract.md. */
|
|
180
180
|
UserToken: {
|
|
181
181
|
/**
|
|
182
182
|
* Format: uuid
|
|
@@ -210,12 +210,87 @@ export interface components {
|
|
|
210
210
|
* @description Timestamp when the token was last updated.
|
|
211
211
|
*/
|
|
212
212
|
updatedAt: string;
|
|
213
|
+
/** @description IDs of the keychains this token is limited to. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent, so every token issued before this field existed keeps working unchanged. A non-empty list always makes the token scoped, whatever keychainScoped says. A scoped token may use only keys that belong to these keychains, intersected with the owner's keys in the organization of the request: the effective keys are never more than the user's own. A scoped token with an empty list holds no keys; it is not unrestricted. A server that stores keychainIds always stores keychainScoped true. Unknown keychain IDs are refused when the token is created. */
|
|
214
|
+
keychainIds?: string[];
|
|
215
|
+
/**
|
|
216
|
+
* Format: date-time
|
|
217
|
+
* @description Time after which the token is no longer accepted. Absent or null means the token never expires, which is the case for every token issued before this field existed. Set when the token is created and not changed afterwards.
|
|
218
|
+
*/
|
|
219
|
+
expiresAt?: string | null;
|
|
220
|
+
/** @description Whether the token is limited to the keys of its keychains. Set by the server at creation: true when the create has a non-empty `keychainIds`. A re-consent that narrows an unrestricted token (false) changes it to true; no other operation changes it, and it is never reset to false. It is read-only to clients. It is stored on the token and never reset, so a scoped token whose keychains have all been deleted stays scoped and holds no keys; a non-empty set of keychain mappings also always means scoped. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent. A true flag is never unrestricted, even with an empty list. */
|
|
221
|
+
readonly keychainScoped?: boolean;
|
|
213
222
|
};
|
|
214
|
-
/** @description Carries the token that revokeToken revokes
|
|
223
|
+
/** @description Carries the token that revokeToken revokes. */
|
|
215
224
|
TokenPayload: {
|
|
216
225
|
/** @description The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected. */
|
|
217
226
|
token: string;
|
|
218
227
|
};
|
|
228
|
+
/** @description Carries the token that introspectToken checks, and the protected resource asking. */
|
|
229
|
+
TokenIntrospectionPayload: {
|
|
230
|
+
/** @description The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected. */
|
|
231
|
+
token: string;
|
|
232
|
+
/**
|
|
233
|
+
* Format: uri
|
|
234
|
+
* @description RFC 8707 resource identifier of the protected resource asking, as published in its RFC 9728 protected resource metadata. Omitted, the REST API. A value that is not a protected resource this server issues tokens for is rejected with 400 "invalid_target".
|
|
235
|
+
*/
|
|
236
|
+
resource?: string;
|
|
237
|
+
};
|
|
238
|
+
/** @description Describes an access token introspectToken accepted, using the RFC 7662 member names where they are single words and their camelCase form where they are not (clientId, tokenType). */
|
|
239
|
+
TokenIntrospection: {
|
|
240
|
+
/** @description Always true; a token that is not active is answered with 401 instead. */
|
|
241
|
+
active: boolean;
|
|
242
|
+
/** @description The resources the token is bound to (RFC 8707 resource identifiers). Always a JSON array, never null or absent: [] for a token the server issued to its own first-party clients, which is valid for every protected resource the server issues tokens for. */
|
|
243
|
+
aud: string[];
|
|
244
|
+
/** @description The subject the token was issued for. */
|
|
245
|
+
sub?: string;
|
|
246
|
+
/** @description The OAuth client the token was issued to. */
|
|
247
|
+
clientId?: string;
|
|
248
|
+
/** @description Space-separated scopes granted to the token. */
|
|
249
|
+
scope?: string;
|
|
250
|
+
/**
|
|
251
|
+
* Format: int64
|
|
252
|
+
* @description Expiry, in seconds since the Unix epoch. Absent for a token that does not expire.
|
|
253
|
+
*/
|
|
254
|
+
exp?: number;
|
|
255
|
+
/**
|
|
256
|
+
* Format: int64
|
|
257
|
+
* @description Issue time, in seconds since the Unix epoch.
|
|
258
|
+
*/
|
|
259
|
+
iat?: number;
|
|
260
|
+
/**
|
|
261
|
+
* Format: int64
|
|
262
|
+
* @description Not-before time, in seconds since the Unix epoch.
|
|
263
|
+
*/
|
|
264
|
+
nbf?: number;
|
|
265
|
+
/** @description The issuer of the token. */
|
|
266
|
+
iss?: string;
|
|
267
|
+
/** @description Always "Bearer". */
|
|
268
|
+
tokenType?: string;
|
|
269
|
+
};
|
|
270
|
+
/** @description Client-settable limits for a token created with generateToken. Every field is optional; an empty body creates an unrestricted token that never expires. The token's name and purpose are query parameters of the operation, and its id, owner and timestamps are server-generated. */
|
|
271
|
+
TokenCreatePayload: {
|
|
272
|
+
/** @description IDs of the keychains the token is limited to. A non-empty list limits the token to the keys of those keychains, intersected with the owner's keys in the request's organization. An absent list creates an unrestricted token. An explicit empty list is refused with 400, so a selection that ends up empty never mints a full-access token. The server records keychainScoped from this list; clients do not set it. */
|
|
273
|
+
keychainIds?: string[];
|
|
274
|
+
/**
|
|
275
|
+
* Format: date-time
|
|
276
|
+
* @description Time after which the token is no longer accepted. Absent or null means it never expires.
|
|
277
|
+
*/
|
|
278
|
+
expiresAt?: string | null;
|
|
279
|
+
};
|
|
280
|
+
/** @description Server-side read result of looking up one presented token by its ID (the token's `jti`) in the token store. It is not a request or response body: the server reads it before any handler runs to decide whether the token is accepted and whether its keys are narrowed to its keychains. The server reports `keychainScoped` true when the stored flag is true or the token has any keychain mapping, so a consumer deciding from this result fails closed. See docs/token-scoping-contract.md. */
|
|
281
|
+
TokenStanding: {
|
|
282
|
+
/**
|
|
283
|
+
* Format: uuid
|
|
284
|
+
* @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
|
|
285
|
+
*/
|
|
286
|
+
id: string;
|
|
287
|
+
/** @description Whether the stored token has been retired (deleted). */
|
|
288
|
+
revoked: boolean;
|
|
289
|
+
/** @description Whether the stored token's `expiresAt` is at or before the time of the lookup, evaluated by the store. A token with no `expiresAt` never expires. */
|
|
290
|
+
expired: boolean;
|
|
291
|
+
/** @description True when the token's stored `keychainScoped` flag is true or the token has any keychain mapping. When true the token is limited to the keys of its keychains, and holds no keys if every one of them has been deleted. The lookup's `keychain_scoped` result column is a computed alias for this value (the stored flag OR any keychain mapping), so a query-mapping consumer does not read the raw stored flag. */
|
|
292
|
+
keychainScoped: boolean;
|
|
293
|
+
};
|
|
219
294
|
/** @description Query fields of GET /api/identity/native/authorize. The signed-in session issues the authorization code from these fields. */
|
|
220
295
|
NativeAuthorizationPayload: {
|
|
221
296
|
/** @description Display name of the native client. */
|
|
@@ -282,6 +357,15 @@ export interface components {
|
|
|
282
357
|
* @description Timestamp when the token was last updated.
|
|
283
358
|
*/
|
|
284
359
|
updatedAt: string;
|
|
360
|
+
/** @description IDs of the keychains this token is limited to. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent, so every token issued before this field existed keeps working unchanged. A non-empty list always makes the token scoped, whatever keychainScoped says. A scoped token may use only keys that belong to these keychains, intersected with the owner's keys in the organization of the request: the effective keys are never more than the user's own. A scoped token with an empty list holds no keys; it is not unrestricted. A server that stores keychainIds always stores keychainScoped true. Unknown keychain IDs are refused when the token is created. */
|
|
361
|
+
keychainIds?: string[];
|
|
362
|
+
/**
|
|
363
|
+
* Format: date-time
|
|
364
|
+
* @description Time after which the token is no longer accepted. Absent or null means the token never expires, which is the case for every token issued before this field existed. Set when the token is created and not changed afterwards.
|
|
365
|
+
*/
|
|
366
|
+
expiresAt?: string | null;
|
|
367
|
+
/** @description Whether the token is limited to the keys of its keychains. Set by the server at creation: true when the create has a non-empty `keychainIds`. A re-consent that narrows an unrestricted token (false) changes it to true; no other operation changes it, and it is never reset to false. It is read-only to clients. It is stored on the token and never reset, so a scoped token whose keychains have all been deleted stays scoped and holds no keys; a non-empty set of keychain mappings also always means scoped. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent. A true flag is never unrestricted, even with an empty list. */
|
|
368
|
+
readonly keychainScoped?: boolean;
|
|
285
369
|
}[];
|
|
286
370
|
/** @description Total number of tokens across all pages. */
|
|
287
371
|
totalCount: number;
|
|
@@ -464,6 +548,15 @@ export interface operations {
|
|
|
464
548
|
* @description Timestamp when the token was last updated.
|
|
465
549
|
*/
|
|
466
550
|
updatedAt: string;
|
|
551
|
+
/** @description IDs of the keychains this token is limited to. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent, so every token issued before this field existed keeps working unchanged. A non-empty list always makes the token scoped, whatever keychainScoped says. A scoped token may use only keys that belong to these keychains, intersected with the owner's keys in the organization of the request: the effective keys are never more than the user's own. A scoped token with an empty list holds no keys; it is not unrestricted. A server that stores keychainIds always stores keychainScoped true. Unknown keychain IDs are refused when the token is created. */
|
|
552
|
+
keychainIds?: string[];
|
|
553
|
+
/**
|
|
554
|
+
* Format: date-time
|
|
555
|
+
* @description Time after which the token is no longer accepted. Absent or null means the token never expires, which is the case for every token issued before this field existed. Set when the token is created and not changed afterwards.
|
|
556
|
+
*/
|
|
557
|
+
expiresAt?: string | null;
|
|
558
|
+
/** @description Whether the token is limited to the keys of its keychains. Set by the server at creation: true when the create has a non-empty `keychainIds`. A re-consent that narrows an unrestricted token (false) changes it to true; no other operation changes it, and it is never reset to false. It is read-only to clients. It is stored on the token and never reset, so a scoped token whose keychains have all been deleted stays scoped and holds no keys; a non-empty set of keychain mappings also always means scoped. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent. A true flag is never unrestricted, even with an empty list. */
|
|
559
|
+
readonly keychainScoped?: boolean;
|
|
467
560
|
}[];
|
|
468
561
|
/** @description Total number of tokens across all pages. */
|
|
469
562
|
totalCount: number;
|
|
@@ -506,7 +599,19 @@ export interface operations {
|
|
|
506
599
|
path?: never;
|
|
507
600
|
cookie?: never;
|
|
508
601
|
};
|
|
509
|
-
requestBody?:
|
|
602
|
+
requestBody?: {
|
|
603
|
+
content: {
|
|
604
|
+
"application/json": {
|
|
605
|
+
/** @description IDs of the keychains the token is limited to. A non-empty list limits the token to the keys of those keychains, intersected with the owner's keys in the request's organization. An absent list creates an unrestricted token. An explicit empty list is refused with 400, so a selection that ends up empty never mints a full-access token. The server records keychainScoped from this list; clients do not set it. */
|
|
606
|
+
keychainIds?: string[];
|
|
607
|
+
/**
|
|
608
|
+
* Format: date-time
|
|
609
|
+
* @description Time after which the token is no longer accepted. Absent or null means it never expires.
|
|
610
|
+
*/
|
|
611
|
+
expiresAt?: string | null;
|
|
612
|
+
};
|
|
613
|
+
};
|
|
614
|
+
};
|
|
510
615
|
responses: {
|
|
511
616
|
/** @description Token generated */
|
|
512
617
|
201: {
|
|
@@ -549,6 +654,15 @@ export interface operations {
|
|
|
549
654
|
* @description Timestamp when the token was last updated.
|
|
550
655
|
*/
|
|
551
656
|
updatedAt: string;
|
|
657
|
+
/** @description IDs of the keychains this token is limited to. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent, so every token issued before this field existed keeps working unchanged. A non-empty list always makes the token scoped, whatever keychainScoped says. A scoped token may use only keys that belong to these keychains, intersected with the owner's keys in the organization of the request: the effective keys are never more than the user's own. A scoped token with an empty list holds no keys; it is not unrestricted. A server that stores keychainIds always stores keychainScoped true. Unknown keychain IDs are refused when the token is created. */
|
|
658
|
+
keychainIds?: string[];
|
|
659
|
+
/**
|
|
660
|
+
* Format: date-time
|
|
661
|
+
* @description Time after which the token is no longer accepted. Absent or null means the token never expires, which is the case for every token issued before this field existed. Set when the token is created and not changed afterwards.
|
|
662
|
+
*/
|
|
663
|
+
expiresAt?: string | null;
|
|
664
|
+
/** @description Whether the token is limited to the keys of its keychains. Set by the server at creation: true when the create has a non-empty `keychainIds`. A re-consent that narrows an unrestricted token (false) changes it to true; no other operation changes it, and it is never reset to false. It is read-only to clients. It is stored on the token and never reset, so a scoped token whose keychains have all been deleted stays scoped and holds no keys; a non-empty set of keychain mappings also always means scoped. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent. A true flag is never unrestricted, even with an empty list. */
|
|
665
|
+
readonly keychainScoped?: boolean;
|
|
552
666
|
}[];
|
|
553
667
|
/** @description Total number of tokens across all pages. */
|
|
554
668
|
totalCount: number;
|
|
@@ -577,6 +691,15 @@ export interface operations {
|
|
|
577
691
|
"text/plain": string;
|
|
578
692
|
};
|
|
579
693
|
};
|
|
694
|
+
/** @description Forbidden */
|
|
695
|
+
403: {
|
|
696
|
+
headers: {
|
|
697
|
+
[name: string]: unknown;
|
|
698
|
+
};
|
|
699
|
+
content: {
|
|
700
|
+
"text/plain": string;
|
|
701
|
+
};
|
|
702
|
+
};
|
|
580
703
|
/** @description Internal server error */
|
|
581
704
|
500: {
|
|
582
705
|
headers: {
|
|
@@ -641,6 +764,15 @@ export interface operations {
|
|
|
641
764
|
* @description Timestamp when the token was last updated.
|
|
642
765
|
*/
|
|
643
766
|
updatedAt: string;
|
|
767
|
+
/** @description IDs of the keychains this token is limited to. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent, so every token issued before this field existed keeps working unchanged. A non-empty list always makes the token scoped, whatever keychainScoped says. A scoped token may use only keys that belong to these keychains, intersected with the owner's keys in the organization of the request: the effective keys are never more than the user's own. A scoped token with an empty list holds no keys; it is not unrestricted. A server that stores keychainIds always stores keychainScoped true. Unknown keychain IDs are refused when the token is created. */
|
|
768
|
+
keychainIds?: string[];
|
|
769
|
+
/**
|
|
770
|
+
* Format: date-time
|
|
771
|
+
* @description Time after which the token is no longer accepted. Absent or null means the token never expires, which is the case for every token issued before this field existed. Set when the token is created and not changed afterwards.
|
|
772
|
+
*/
|
|
773
|
+
expiresAt?: string | null;
|
|
774
|
+
/** @description Whether the token is limited to the keys of its keychains. Set by the server at creation: true when the create has a non-empty `keychainIds`. A re-consent that narrows an unrestricted token (false) changes it to true; no other operation changes it, and it is never reset to false. It is read-only to clients. It is stored on the token and never reset, so a scoped token whose keychains have all been deleted stays scoped and holds no keys; a non-empty set of keychain mappings also always means scoped. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent. A true flag is never unrestricted, even with an empty list. */
|
|
775
|
+
readonly keychainScoped?: boolean;
|
|
644
776
|
}[];
|
|
645
777
|
/** @description Total number of tokens across all pages. */
|
|
646
778
|
totalCount: number;
|
|
@@ -731,6 +863,15 @@ export interface operations {
|
|
|
731
863
|
* @description Timestamp when the token was last updated.
|
|
732
864
|
*/
|
|
733
865
|
updatedAt: string;
|
|
866
|
+
/** @description IDs of the keychains this token is limited to. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent, so every token issued before this field existed keeps working unchanged. A non-empty list always makes the token scoped, whatever keychainScoped says. A scoped token may use only keys that belong to these keychains, intersected with the owner's keys in the organization of the request: the effective keys are never more than the user's own. A scoped token with an empty list holds no keys; it is not unrestricted. A server that stores keychainIds always stores keychainScoped true. Unknown keychain IDs are refused when the token is created. */
|
|
867
|
+
keychainIds?: string[];
|
|
868
|
+
/**
|
|
869
|
+
* Format: date-time
|
|
870
|
+
* @description Time after which the token is no longer accepted. Absent or null means the token never expires, which is the case for every token issued before this field existed. Set when the token is created and not changed afterwards.
|
|
871
|
+
*/
|
|
872
|
+
expiresAt?: string | null;
|
|
873
|
+
/** @description Whether the token is limited to the keys of its keychains. Set by the server at creation: true when the create has a non-empty `keychainIds`. A re-consent that narrows an unrestricted token (false) changes it to true; no other operation changes it, and it is never reset to false. It is read-only to clients. It is stored on the token and never reset, so a scoped token whose keychains have all been deleted stays scoped and holds no keys; a non-empty set of keychain mappings also always means scoped. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent. A true flag is never unrestricted, even with an empty list. */
|
|
874
|
+
readonly keychainScoped?: boolean;
|
|
734
875
|
};
|
|
735
876
|
};
|
|
736
877
|
};
|
|
@@ -818,6 +959,15 @@ export interface operations {
|
|
|
818
959
|
* @description Timestamp when the token was last updated.
|
|
819
960
|
*/
|
|
820
961
|
updatedAt: string;
|
|
962
|
+
/** @description IDs of the keychains this token is limited to. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent, so every token issued before this field existed keeps working unchanged. A non-empty list always makes the token scoped, whatever keychainScoped says. A scoped token may use only keys that belong to these keychains, intersected with the owner's keys in the organization of the request: the effective keys are never more than the user's own. A scoped token with an empty list holds no keys; it is not unrestricted. A server that stores keychainIds always stores keychainScoped true. Unknown keychain IDs are refused when the token is created. */
|
|
963
|
+
keychainIds?: string[];
|
|
964
|
+
/**
|
|
965
|
+
* Format: date-time
|
|
966
|
+
* @description Time after which the token is no longer accepted. Absent or null means the token never expires, which is the case for every token issued before this field existed. Set when the token is created and not changed afterwards.
|
|
967
|
+
*/
|
|
968
|
+
expiresAt?: string | null;
|
|
969
|
+
/** @description Whether the token is limited to the keys of its keychains. Set by the server at creation: true when the create has a non-empty `keychainIds`. A re-consent that narrows an unrestricted token (false) changes it to true; no other operation changes it, and it is never reset to false. It is read-only to clients. It is stored on the token and never reset, so a scoped token whose keychains have all been deleted stays scoped and holds no keys; a non-empty set of keychain mappings also always means scoped. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent. A true flag is never unrestricted, even with an empty list. */
|
|
970
|
+
readonly keychainScoped?: boolean;
|
|
821
971
|
}[];
|
|
822
972
|
/** @description Total number of tokens across all pages. */
|
|
823
973
|
totalCount: number;
|
|
@@ -846,6 +996,15 @@ export interface operations {
|
|
|
846
996
|
"text/plain": string;
|
|
847
997
|
};
|
|
848
998
|
};
|
|
999
|
+
/** @description Forbidden */
|
|
1000
|
+
403: {
|
|
1001
|
+
headers: {
|
|
1002
|
+
[name: string]: unknown;
|
|
1003
|
+
};
|
|
1004
|
+
content: {
|
|
1005
|
+
"text/plain": string;
|
|
1006
|
+
};
|
|
1007
|
+
};
|
|
849
1008
|
/** @description Internal server error */
|
|
850
1009
|
500: {
|
|
851
1010
|
headers: {
|
|
@@ -994,6 +1153,15 @@ export interface operations {
|
|
|
994
1153
|
* @description Timestamp when the token was last updated.
|
|
995
1154
|
*/
|
|
996
1155
|
updatedAt: string;
|
|
1156
|
+
/** @description IDs of the keychains this token is limited to. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent, so every token issued before this field existed keeps working unchanged. A non-empty list always makes the token scoped, whatever keychainScoped says. A scoped token may use only keys that belong to these keychains, intersected with the owner's keys in the organization of the request: the effective keys are never more than the user's own. A scoped token with an empty list holds no keys; it is not unrestricted. A server that stores keychainIds always stores keychainScoped true. Unknown keychain IDs are refused when the token is created. */
|
|
1157
|
+
keychainIds?: string[];
|
|
1158
|
+
/**
|
|
1159
|
+
* Format: date-time
|
|
1160
|
+
* @description Time after which the token is no longer accepted. Absent or null means the token never expires, which is the case for every token issued before this field existed. Set when the token is created and not changed afterwards.
|
|
1161
|
+
*/
|
|
1162
|
+
expiresAt?: string | null;
|
|
1163
|
+
/** @description Whether the token is limited to the keys of its keychains. Set by the server at creation: true when the create has a non-empty `keychainIds`. A re-consent that narrows an unrestricted token (false) changes it to true; no other operation changes it, and it is never reset to false. It is read-only to clients. It is stored on the token and never reset, so a scoped token whose keychains have all been deleted stays scoped and holds no keys; a non-empty set of keychain mappings also always means scoped. A token is unrestricted only when keychainScoped is false or absent and keychainIds is empty or absent. A true flag is never unrestricted, even with an empty list. */
|
|
1164
|
+
readonly keychainScoped?: boolean;
|
|
997
1165
|
};
|
|
998
1166
|
};
|
|
999
1167
|
};
|
|
@@ -1069,7 +1237,7 @@ export interface operations {
|
|
|
1069
1237
|
"text/plain": string;
|
|
1070
1238
|
};
|
|
1071
1239
|
};
|
|
1072
|
-
/** @description Signing keys (JWKS) or the token store could not be read, so the token was not revoked. The body is "token revocation status is temporarily unavailable"; the caller should retry. */
|
|
1240
|
+
/** @description Signing keys (JWKS) or the token store could not be read, or the OAuth2 server could not be asked who the token belongs to, so the token was not revoked. The body is "token revocation status is temporarily unavailable"; the caller should retry. */
|
|
1073
1241
|
503: {
|
|
1074
1242
|
headers: {
|
|
1075
1243
|
[name: string]: unknown;
|
|
@@ -1092,16 +1260,53 @@ export interface operations {
|
|
|
1092
1260
|
"application/json": {
|
|
1093
1261
|
/** @description The token. Surrounding whitespace is trimmed; a value that is empty after trimming is rejected. */
|
|
1094
1262
|
token: string;
|
|
1263
|
+
/**
|
|
1264
|
+
* Format: uri
|
|
1265
|
+
* @description RFC 8707 resource identifier of the protected resource asking, as published in its RFC 9728 protected resource metadata. Omitted, the REST API. A value that is not a protected resource this server issues tokens for is rejected with 400 "invalid_target".
|
|
1266
|
+
*/
|
|
1267
|
+
resource?: string;
|
|
1095
1268
|
};
|
|
1096
1269
|
};
|
|
1097
1270
|
};
|
|
1098
1271
|
responses: {
|
|
1099
|
-
/** @description
|
|
1272
|
+
/** @description The token is authentic, unexpired, not revoked and valid for the requested resource. The body describes it. */
|
|
1100
1273
|
200: {
|
|
1101
1274
|
headers: {
|
|
1102
1275
|
[name: string]: unknown;
|
|
1103
1276
|
};
|
|
1104
|
-
content
|
|
1277
|
+
content: {
|
|
1278
|
+
"application/json": {
|
|
1279
|
+
/** @description Always true; a token that is not active is answered with 401 instead. */
|
|
1280
|
+
active: boolean;
|
|
1281
|
+
/** @description The resources the token is bound to (RFC 8707 resource identifiers). Always a JSON array, never null or absent: [] for a token the server issued to its own first-party clients, which is valid for every protected resource the server issues tokens for. */
|
|
1282
|
+
aud: string[];
|
|
1283
|
+
/** @description The subject the token was issued for. */
|
|
1284
|
+
sub?: string;
|
|
1285
|
+
/** @description The OAuth client the token was issued to. */
|
|
1286
|
+
clientId?: string;
|
|
1287
|
+
/** @description Space-separated scopes granted to the token. */
|
|
1288
|
+
scope?: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* Format: int64
|
|
1291
|
+
* @description Expiry, in seconds since the Unix epoch. Absent for a token that does not expire.
|
|
1292
|
+
*/
|
|
1293
|
+
exp?: number;
|
|
1294
|
+
/**
|
|
1295
|
+
* Format: int64
|
|
1296
|
+
* @description Issue time, in seconds since the Unix epoch.
|
|
1297
|
+
*/
|
|
1298
|
+
iat?: number;
|
|
1299
|
+
/**
|
|
1300
|
+
* Format: int64
|
|
1301
|
+
* @description Not-before time, in seconds since the Unix epoch.
|
|
1302
|
+
*/
|
|
1303
|
+
nbf?: number;
|
|
1304
|
+
/** @description The issuer of the token. */
|
|
1305
|
+
iss?: string;
|
|
1306
|
+
/** @description Always "Bearer". */
|
|
1307
|
+
tokenType?: string;
|
|
1308
|
+
};
|
|
1309
|
+
};
|
|
1105
1310
|
};
|
|
1106
1311
|
/** @description Invalid request body or request param */
|
|
1107
1312
|
400: {
|