@aws-sdk/nested-clients 3.997.30 → 3.997.32
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-cjs/submodules/cognito-identity/index.js +1 -1
- package/dist-cjs/submodules/signin/index.js +116 -72
- package/dist-cjs/submodules/sso/index.js +1 -1
- package/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/dist-cjs/submodules/sts/index.js +1 -1
- package/dist-es/submodules/signin/Signin.js +2 -0
- package/dist-es/submodules/signin/commandBuilder.js +3 -0
- package/dist-es/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.js +4 -0
- package/dist-es/submodules/signin/commands/index.js +1 -0
- package/dist-es/submodules/signin/endpoint/bdd.js +80 -70
- package/dist-es/submodules/signin/endpoint/endpointResolver.js +1 -1
- package/dist-es/submodules/signin/schemas/schemas_0.js +23 -0
- package/dist-types/submodules/signin/Signin.d.ts +7 -0
- package/dist-types/submodules/signin/SigninClient.d.ts +3 -2
- package/dist-types/submodules/signin/commandBuilder.d.ts +8 -4
- package/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +2 -2
- package/dist-types/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.d.ts +114 -0
- package/dist-types/submodules/signin/commands/index.d.ts +1 -0
- package/dist-types/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
- package/dist-types/submodules/signin/models/models_0.d.ts +41 -3
- package/dist-types/submodules/signin/schemas/schemas_0.d.ts +3 -0
- package/dist-types/ts3.4/submodules/signin/Signin.d.ts +17 -0
- package/dist-types/ts3.4/submodules/signin/SigninClient.d.ts +10 -2
- package/dist-types/ts3.4/submodules/signin/commandBuilder.d.ts +12 -7
- package/dist-types/ts3.4/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +4 -4
- package/dist-types/ts3.4/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.d.ts +44 -0
- package/dist-types/ts3.4/submodules/signin/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
- package/dist-types/ts3.4/submodules/signin/models/models_0.d.ts +9 -0
- package/dist-types/ts3.4/submodules/signin/schemas/schemas_0.d.ts +3 -0
- package/package.json +11 -8
|
@@ -77,58 +77,61 @@ const commonParams = {
|
|
|
77
77
|
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
var version = "3.997.
|
|
80
|
+
var version = "3.997.31";
|
|
81
81
|
var packageInfo = {
|
|
82
82
|
version: version};
|
|
83
83
|
|
|
84
|
-
const
|
|
85
|
-
const a = -1, b =
|
|
84
|
+
const s = "ref";
|
|
85
|
+
const a = -1, b = false, c = true, d = "isSet", e = "booleanEquals", f = "coalesce", g = "PartitionResult", h = "stringEquals", i = "getAttr", j = "https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}", k = { [s]: "Endpoint" }, l = { "fn": i, "argv": [{ [s]: g }, "name"] }, m = { [s]: "Region" }, n = { [s]: g }, o = { "authSchemes": [{ "name": "sigv4", "signingName": "signin", "signingRegion": "{Region}" }] }, p = {}, q = [m];
|
|
86
86
|
const _data = {
|
|
87
87
|
conditions: [
|
|
88
|
-
[
|
|
89
|
-
[
|
|
90
|
-
[
|
|
91
|
-
["aws.partition",
|
|
92
|
-
[
|
|
93
|
-
[
|
|
94
|
-
[
|
|
95
|
-
[
|
|
96
|
-
[
|
|
97
|
-
[
|
|
98
|
-
[
|
|
99
|
-
[
|
|
100
|
-
[
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
[
|
|
104
|
-
[
|
|
88
|
+
[d, q],
|
|
89
|
+
[e, [{ fn: f, argv: [{ [s]: "IsControlPlane" }, b] }, c]],
|
|
90
|
+
[d, [k]],
|
|
91
|
+
["aws.partition", q, g],
|
|
92
|
+
[e, [{ [s]: "UseFIPS" }, c]],
|
|
93
|
+
[h, [l, "aws"]],
|
|
94
|
+
[e, [{ fn: f, argv: [{ [s]: "IsOAuthEndpoint" }, b] }, c]],
|
|
95
|
+
[e, [{ [s]: "UseDualStack" }, c]],
|
|
96
|
+
[h, [l, "aws-cn"]],
|
|
97
|
+
[h, [m, "us-gov-west-1"]],
|
|
98
|
+
[h, [l, "aws-us-gov"]],
|
|
99
|
+
[e, [{ fn: i, argv: [n, "supportsFIPS"] }, c]],
|
|
100
|
+
[h, [l, "aws-iso"]],
|
|
101
|
+
[h, [l, "aws-iso-b"]],
|
|
102
|
+
[h, [l, "aws-iso-f"]],
|
|
103
|
+
[h, [l, "aws-iso-e"]],
|
|
104
|
+
[h, [l, "aws-eusc"]],
|
|
105
|
+
[e, [{ fn: i, argv: [n, "supportsDualStack"] }, c]]
|
|
105
106
|
],
|
|
106
107
|
results: [
|
|
107
108
|
[a],
|
|
108
|
-
["https://signin.{Region}.api.aws",
|
|
109
|
-
["https://signin.{Region}.api.amazonwebservices.com.cn",
|
|
110
|
-
[
|
|
111
|
-
["
|
|
112
|
-
["https://{Region}.signin.
|
|
113
|
-
["https://{Region}.signin.
|
|
114
|
-
["https://{Region}.signin.
|
|
115
|
-
["https://{Region}.signin.
|
|
116
|
-
["https://{Region}.signin.
|
|
117
|
-
["https://{Region}.signin.
|
|
118
|
-
["https://{Region}.signin.
|
|
119
|
-
["https://signin
|
|
120
|
-
["https://{Region}.signin
|
|
121
|
-
["https://
|
|
109
|
+
["https://signin.{Region}.api.aws", o],
|
|
110
|
+
["https://signin.{Region}.api.amazonwebservices.com.cn", o],
|
|
111
|
+
[j, o],
|
|
112
|
+
[a, "FIPS endpoints are not supported for OAuth operations. Disable FIPS or use a non-OAuth operation."],
|
|
113
|
+
["https://{Region}.oauth.signin.aws", o],
|
|
114
|
+
["https://{Region}.signin.aws.amazon.com", p],
|
|
115
|
+
["https://{Region}.signin.amazonaws.cn", p],
|
|
116
|
+
["https://{Region}.signin.amazonaws-us-gov.com", p],
|
|
117
|
+
["https://{Region}.signin.c2shome.ic.gov", p],
|
|
118
|
+
["https://{Region}.signin.sc2shome.sgov.gov", p],
|
|
119
|
+
["https://{Region}.signin.csphome.hci.ic.gov", p],
|
|
120
|
+
["https://{Region}.signin.csphome.adc-e.uk", p],
|
|
121
|
+
["https://{Region}.signin.amazonaws-eusc.eu", p],
|
|
122
|
+
["https://signin-fips.amazonaws-us-gov.com", p],
|
|
123
|
+
["https://{Region}.signin-fips.amazonaws-us-gov.com", p],
|
|
124
|
+
["https://{Region}.signin.{PartitionResult#dnsSuffix}", p],
|
|
122
125
|
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
123
126
|
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
124
|
-
[
|
|
125
|
-
["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
|
|
127
|
+
[k, p],
|
|
128
|
+
["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", p],
|
|
126
129
|
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
127
|
-
["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",
|
|
130
|
+
["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}", p],
|
|
128
131
|
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
129
|
-
[
|
|
132
|
+
[j, p],
|
|
130
133
|
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
131
|
-
["https://signin.{Region}.{PartitionResult#dnsSuffix}",
|
|
134
|
+
["https://signin.{Region}.{PartitionResult#dnsSuffix}", p],
|
|
132
135
|
[a, "Invalid Configuration: Missing Region"]
|
|
133
136
|
]
|
|
134
137
|
};
|
|
@@ -136,44 +139,51 @@ const root = 2;
|
|
|
136
139
|
const r = 100_000_000;
|
|
137
140
|
const nodes = new Int32Array([
|
|
138
141
|
-1, 1, -1,
|
|
139
|
-
0,
|
|
140
|
-
2,
|
|
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
|
-
6, r +
|
|
170
|
-
7, r +
|
|
142
|
+
0, 6, 3,
|
|
143
|
+
2, 36, 4,
|
|
144
|
+
4, 5, r + 27,
|
|
145
|
+
6, r + 4, r + 27,
|
|
146
|
+
1, 29, 7,
|
|
147
|
+
2, 36, 8,
|
|
148
|
+
3, 9, 31,
|
|
149
|
+
4, 22, 10,
|
|
150
|
+
5, 19, 11,
|
|
151
|
+
7, 21, 12,
|
|
152
|
+
8, r + 7, 13,
|
|
153
|
+
10, r + 8, 14,
|
|
154
|
+
12, r + 9, 15,
|
|
155
|
+
13, r + 10, 16,
|
|
156
|
+
14, r + 11, 17,
|
|
157
|
+
15, r + 12, 18,
|
|
158
|
+
16, r + 13, r + 16,
|
|
159
|
+
6, r + 5, 20,
|
|
160
|
+
7, 21, r + 6,
|
|
161
|
+
17, r + 24, r + 25,
|
|
162
|
+
6, r + 4, 23,
|
|
163
|
+
7, 27, 24,
|
|
164
|
+
9, r + 14, 25,
|
|
165
|
+
10, r + 15, 26,
|
|
166
|
+
11, r + 22, r + 23,
|
|
167
|
+
11, 28, r + 21,
|
|
168
|
+
17, r + 20, r + 21,
|
|
169
|
+
2, 35, 30,
|
|
170
|
+
3, 39, 31,
|
|
171
|
+
4, 32, r + 27,
|
|
172
|
+
6, r + 4, 33,
|
|
173
|
+
7, r + 27, 34,
|
|
174
|
+
9, r + 14, r + 27,
|
|
175
|
+
3, 39, 36,
|
|
176
|
+
4, 38, 37,
|
|
177
|
+
7, r + 18, r + 19,
|
|
178
|
+
6, r + 4, r + 17,
|
|
179
|
+
5, r + 1, 40,
|
|
180
|
+
8, r + 2, r + 3,
|
|
171
181
|
]);
|
|
172
182
|
const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
173
183
|
|
|
174
184
|
const cache = new EndpointCache({
|
|
175
185
|
size: 50,
|
|
176
|
-
params: ["Endpoint", "IsControlPlane", "Region", "UseDualStack", "UseFIPS"],
|
|
186
|
+
params: ["Endpoint", "IsControlPlane", "IsOAuthEndpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
177
187
|
});
|
|
178
188
|
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
179
189
|
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
@@ -254,24 +264,32 @@ const _COATR = "CreateOAuth2TokenRequest";
|
|
|
254
264
|
const _COATRB = "CreateOAuth2TokenRequestBody";
|
|
255
265
|
const _COATRBr = "CreateOAuth2TokenResponseBody";
|
|
256
266
|
const _COATRr = "CreateOAuth2TokenResponse";
|
|
267
|
+
const _COATWIAM = "CreateOAuth2TokenWithIAM";
|
|
268
|
+
const _COATWIAMR = "CreateOAuth2TokenWithIAMRequest";
|
|
269
|
+
const _COATWIAMRr = "CreateOAuth2TokenWithIAMResponse";
|
|
257
270
|
const _ISE = "InternalServerException";
|
|
271
|
+
const _OAAT = "OAuthAccessToken";
|
|
258
272
|
const _RT = "RefreshToken";
|
|
259
273
|
const _TMRE = "TooManyRequestsError";
|
|
260
274
|
const _VE = "ValidationException";
|
|
261
275
|
const _aKI = "accessKeyId";
|
|
262
276
|
const _aT = "accessToken";
|
|
277
|
+
const _at = "access_token";
|
|
263
278
|
const _c = "client";
|
|
264
279
|
const _cI = "clientId";
|
|
265
280
|
const _cV = "codeVerifier";
|
|
266
281
|
const _co = "code";
|
|
267
282
|
const _e = "error";
|
|
268
283
|
const _eI = "expiresIn";
|
|
284
|
+
const _ei = "expires_in";
|
|
269
285
|
const _gT = "grantType";
|
|
286
|
+
const _gt = "grant_type";
|
|
270
287
|
const _h = "http";
|
|
271
288
|
const _hE = "httpError";
|
|
272
289
|
const _iT = "idToken";
|
|
273
290
|
const _jN = "jsonName";
|
|
274
291
|
const _m = "message";
|
|
292
|
+
const _r = "resource";
|
|
275
293
|
const _rT = "refreshToken";
|
|
276
294
|
const _rU = "redirectUri";
|
|
277
295
|
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.signin";
|
|
@@ -281,6 +299,7 @@ const _se = "server";
|
|
|
281
299
|
const _tI = "tokenInput";
|
|
282
300
|
const _tO = "tokenOutput";
|
|
283
301
|
const _tT = "tokenType";
|
|
302
|
+
const _tt = "token_type";
|
|
284
303
|
const n0 = "com.amazonaws.signin";
|
|
285
304
|
const _s_registry = TypeRegistry.for(_s);
|
|
286
305
|
var SigninServiceException$ = [-3, _s, "SigninServiceException", 0, [], []];
|
|
@@ -314,6 +333,7 @@ const errorTypeRegistries = [
|
|
|
314
333
|
_s_registry,
|
|
315
334
|
n0_registry,
|
|
316
335
|
];
|
|
336
|
+
var OAuthAccessToken = [0, n0, _OAAT, 8, 0];
|
|
317
337
|
var RefreshToken = [0, n0, _RT, 8, 0];
|
|
318
338
|
var AccessToken$ = [3, n0, _AT,
|
|
319
339
|
8,
|
|
@@ -340,9 +360,22 @@ var CreateOAuth2TokenResponseBody$ = [3, n0, _COATRBr,
|
|
|
340
360
|
[_aT, _tT, _eI, _rT, _iT],
|
|
341
361
|
[[() => AccessToken$, { [_jN]: _aT }], [0, { [_jN]: _tT }], [1, { [_jN]: _eI }], [() => RefreshToken, { [_jN]: _rT }], [0, { [_jN]: _iT }]], 4
|
|
342
362
|
];
|
|
363
|
+
var CreateOAuth2TokenWithIAMRequest$ = [3, n0, _COATWIAMR,
|
|
364
|
+
0,
|
|
365
|
+
[_gT, _r],
|
|
366
|
+
[[0, { [_jN]: _gt }], 0], 2
|
|
367
|
+
];
|
|
368
|
+
var CreateOAuth2TokenWithIAMResponse$ = [3, n0, _COATWIAMRr,
|
|
369
|
+
0,
|
|
370
|
+
[_aT, _tT, _eI],
|
|
371
|
+
[[() => OAuthAccessToken, { [_jN]: _at }], [0, { [_jN]: _tt }], [1, { [_jN]: _ei }]], 3
|
|
372
|
+
];
|
|
343
373
|
var CreateOAuth2Token$ = [9, n0, _COAT,
|
|
344
374
|
{ [_h]: ["POST", "/v1/token", 200] }, () => CreateOAuth2TokenRequest$, () => CreateOAuth2TokenResponse$
|
|
345
375
|
];
|
|
376
|
+
var CreateOAuth2TokenWithIAM$ = [9, n0, _COATWIAM,
|
|
377
|
+
{ [_h]: ["POST", "/v1/token?x-amz-client-auth-method=iam", 200] }, () => CreateOAuth2TokenWithIAMRequest$, () => CreateOAuth2TokenWithIAMResponse$
|
|
378
|
+
];
|
|
346
379
|
|
|
347
380
|
const getRuntimeConfig$1 = (config) => {
|
|
348
381
|
return {
|
|
@@ -498,13 +531,20 @@ const command = makeBuilder(commonParams, "Signin", "SigninClient", getEndpointP
|
|
|
498
531
|
const _ep0 = {
|
|
499
532
|
IsControlPlane: { type: "staticContextParams", value: false },
|
|
500
533
|
};
|
|
534
|
+
const _ep1 = {
|
|
535
|
+
IsOAuthEndpoint: { type: "staticContextParams", value: true },
|
|
536
|
+
};
|
|
501
537
|
const _mw0 = (Command, cs, config, o) => [];
|
|
502
538
|
|
|
503
539
|
class CreateOAuth2TokenCommand extends command(_ep0, _mw0, "CreateOAuth2Token", CreateOAuth2Token$) {
|
|
504
540
|
}
|
|
505
541
|
|
|
542
|
+
class CreateOAuth2TokenWithIAMCommand extends command(_ep1, _mw0, "CreateOAuth2TokenWithIAM", CreateOAuth2TokenWithIAM$) {
|
|
543
|
+
}
|
|
544
|
+
|
|
506
545
|
const commands = {
|
|
507
546
|
CreateOAuth2TokenCommand,
|
|
547
|
+
CreateOAuth2TokenWithIAMCommand,
|
|
508
548
|
};
|
|
509
549
|
class Signin extends SigninClient {
|
|
510
550
|
}
|
|
@@ -531,6 +571,10 @@ exports.CreateOAuth2TokenRequest$ = CreateOAuth2TokenRequest$;
|
|
|
531
571
|
exports.CreateOAuth2TokenRequestBody$ = CreateOAuth2TokenRequestBody$;
|
|
532
572
|
exports.CreateOAuth2TokenResponse$ = CreateOAuth2TokenResponse$;
|
|
533
573
|
exports.CreateOAuth2TokenResponseBody$ = CreateOAuth2TokenResponseBody$;
|
|
574
|
+
exports.CreateOAuth2TokenWithIAM$ = CreateOAuth2TokenWithIAM$;
|
|
575
|
+
exports.CreateOAuth2TokenWithIAMCommand = CreateOAuth2TokenWithIAMCommand;
|
|
576
|
+
exports.CreateOAuth2TokenWithIAMRequest$ = CreateOAuth2TokenWithIAMRequest$;
|
|
577
|
+
exports.CreateOAuth2TokenWithIAMResponse$ = CreateOAuth2TokenWithIAMResponse$;
|
|
534
578
|
exports.InternalServerException = InternalServerException;
|
|
535
579
|
exports.InternalServerException$ = InternalServerException$;
|
|
536
580
|
exports.OAuth2ErrorCode = OAuth2ErrorCode;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { createAggregatedClient } from "@smithy/core/client";
|
|
2
2
|
import { CreateOAuth2TokenCommand, } from "./commands/CreateOAuth2TokenCommand";
|
|
3
|
+
import { CreateOAuth2TokenWithIAMCommand, } from "./commands/CreateOAuth2TokenWithIAMCommand";
|
|
3
4
|
import { SigninClient } from "./SigninClient";
|
|
4
5
|
const commands = {
|
|
5
6
|
CreateOAuth2TokenCommand,
|
|
7
|
+
CreateOAuth2TokenWithIAMCommand,
|
|
6
8
|
};
|
|
7
9
|
export class Signin extends SigninClient {
|
|
8
10
|
}
|
|
@@ -5,4 +5,7 @@ export const command = makeBuilder(commonParams, "Signin", "SigninClient", getEn
|
|
|
5
5
|
export const _ep0 = {
|
|
6
6
|
IsControlPlane: { type: "staticContextParams", value: false },
|
|
7
7
|
};
|
|
8
|
+
export const _ep1 = {
|
|
9
|
+
IsOAuthEndpoint: { type: "staticContextParams", value: true },
|
|
10
|
+
};
|
|
8
11
|
export const _mw0 = (Command, cs, config, o) => [];
|
|
@@ -1,52 +1,55 @@
|
|
|
1
1
|
import { BinaryDecisionDiagram } from "@smithy/core/endpoints";
|
|
2
|
-
const
|
|
3
|
-
const a = -1, b =
|
|
2
|
+
const s = "ref";
|
|
3
|
+
const a = -1, b = false, c = true, d = "isSet", e = "booleanEquals", f = "coalesce", g = "PartitionResult", h = "stringEquals", i = "getAttr", j = "https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}", k = { [s]: "Endpoint" }, l = { "fn": i, "argv": [{ [s]: g }, "name"] }, m = { [s]: "Region" }, n = { [s]: g }, o = { "authSchemes": [{ "name": "sigv4", "signingName": "signin", "signingRegion": "{Region}" }] }, p = {}, q = [m];
|
|
4
4
|
const _data = {
|
|
5
5
|
conditions: [
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
["aws.partition",
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
6
|
+
[d, q],
|
|
7
|
+
[e, [{ fn: f, argv: [{ [s]: "IsControlPlane" }, b] }, c]],
|
|
8
|
+
[d, [k]],
|
|
9
|
+
["aws.partition", q, g],
|
|
10
|
+
[e, [{ [s]: "UseFIPS" }, c]],
|
|
11
|
+
[h, [l, "aws"]],
|
|
12
|
+
[e, [{ fn: f, argv: [{ [s]: "IsOAuthEndpoint" }, b] }, c]],
|
|
13
|
+
[e, [{ [s]: "UseDualStack" }, c]],
|
|
14
|
+
[h, [l, "aws-cn"]],
|
|
15
|
+
[h, [m, "us-gov-west-1"]],
|
|
16
|
+
[h, [l, "aws-us-gov"]],
|
|
17
|
+
[e, [{ fn: i, argv: [n, "supportsFIPS"] }, c]],
|
|
18
|
+
[h, [l, "aws-iso"]],
|
|
19
|
+
[h, [l, "aws-iso-b"]],
|
|
20
|
+
[h, [l, "aws-iso-f"]],
|
|
21
|
+
[h, [l, "aws-iso-e"]],
|
|
22
|
+
[h, [l, "aws-eusc"]],
|
|
23
|
+
[e, [{ fn: i, argv: [n, "supportsDualStack"] }, c]]
|
|
23
24
|
],
|
|
24
25
|
results: [
|
|
25
26
|
[a],
|
|
26
|
-
["https://signin.{Region}.api.aws",
|
|
27
|
-
["https://signin.{Region}.api.amazonwebservices.com.cn",
|
|
28
|
-
[
|
|
29
|
-
["
|
|
30
|
-
["https://{Region}.signin.
|
|
31
|
-
["https://{Region}.signin.
|
|
32
|
-
["https://{Region}.signin.
|
|
33
|
-
["https://{Region}.signin.
|
|
34
|
-
["https://{Region}.signin.
|
|
35
|
-
["https://{Region}.signin.
|
|
36
|
-
["https://{Region}.signin.
|
|
37
|
-
["https://signin
|
|
38
|
-
["https://{Region}.signin
|
|
39
|
-
["https://
|
|
27
|
+
["https://signin.{Region}.api.aws", o],
|
|
28
|
+
["https://signin.{Region}.api.amazonwebservices.com.cn", o],
|
|
29
|
+
[j, o],
|
|
30
|
+
[a, "FIPS endpoints are not supported for OAuth operations. Disable FIPS or use a non-OAuth operation."],
|
|
31
|
+
["https://{Region}.oauth.signin.aws", o],
|
|
32
|
+
["https://{Region}.signin.aws.amazon.com", p],
|
|
33
|
+
["https://{Region}.signin.amazonaws.cn", p],
|
|
34
|
+
["https://{Region}.signin.amazonaws-us-gov.com", p],
|
|
35
|
+
["https://{Region}.signin.c2shome.ic.gov", p],
|
|
36
|
+
["https://{Region}.signin.sc2shome.sgov.gov", p],
|
|
37
|
+
["https://{Region}.signin.csphome.hci.ic.gov", p],
|
|
38
|
+
["https://{Region}.signin.csphome.adc-e.uk", p],
|
|
39
|
+
["https://{Region}.signin.amazonaws-eusc.eu", p],
|
|
40
|
+
["https://signin-fips.amazonaws-us-gov.com", p],
|
|
41
|
+
["https://{Region}.signin-fips.amazonaws-us-gov.com", p],
|
|
42
|
+
["https://{Region}.signin.{PartitionResult#dnsSuffix}", p],
|
|
40
43
|
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
41
44
|
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
42
|
-
[
|
|
43
|
-
["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
|
|
45
|
+
[k, p],
|
|
46
|
+
["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", p],
|
|
44
47
|
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
45
|
-
["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",
|
|
48
|
+
["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}", p],
|
|
46
49
|
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
47
|
-
[
|
|
50
|
+
[j, p],
|
|
48
51
|
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
49
|
-
["https://signin.{Region}.{PartitionResult#dnsSuffix}",
|
|
52
|
+
["https://signin.{Region}.{PartitionResult#dnsSuffix}", p],
|
|
50
53
|
[a, "Invalid Configuration: Missing Region"]
|
|
51
54
|
]
|
|
52
55
|
};
|
|
@@ -54,37 +57,44 @@ const root = 2;
|
|
|
54
57
|
const r = 100_000_000;
|
|
55
58
|
const nodes = new Int32Array([
|
|
56
59
|
-1, 1, -1,
|
|
57
|
-
0,
|
|
58
|
-
2,
|
|
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
|
-
6, r +
|
|
88
|
-
7, r +
|
|
60
|
+
0, 6, 3,
|
|
61
|
+
2, 36, 4,
|
|
62
|
+
4, 5, r + 27,
|
|
63
|
+
6, r + 4, r + 27,
|
|
64
|
+
1, 29, 7,
|
|
65
|
+
2, 36, 8,
|
|
66
|
+
3, 9, 31,
|
|
67
|
+
4, 22, 10,
|
|
68
|
+
5, 19, 11,
|
|
69
|
+
7, 21, 12,
|
|
70
|
+
8, r + 7, 13,
|
|
71
|
+
10, r + 8, 14,
|
|
72
|
+
12, r + 9, 15,
|
|
73
|
+
13, r + 10, 16,
|
|
74
|
+
14, r + 11, 17,
|
|
75
|
+
15, r + 12, 18,
|
|
76
|
+
16, r + 13, r + 16,
|
|
77
|
+
6, r + 5, 20,
|
|
78
|
+
7, 21, r + 6,
|
|
79
|
+
17, r + 24, r + 25,
|
|
80
|
+
6, r + 4, 23,
|
|
81
|
+
7, 27, 24,
|
|
82
|
+
9, r + 14, 25,
|
|
83
|
+
10, r + 15, 26,
|
|
84
|
+
11, r + 22, r + 23,
|
|
85
|
+
11, 28, r + 21,
|
|
86
|
+
17, r + 20, r + 21,
|
|
87
|
+
2, 35, 30,
|
|
88
|
+
3, 39, 31,
|
|
89
|
+
4, 32, r + 27,
|
|
90
|
+
6, r + 4, 33,
|
|
91
|
+
7, r + 27, 34,
|
|
92
|
+
9, r + 14, r + 27,
|
|
93
|
+
3, 39, 36,
|
|
94
|
+
4, 38, 37,
|
|
95
|
+
7, r + 18, r + 19,
|
|
96
|
+
6, r + 4, r + 17,
|
|
97
|
+
5, r + 1, 40,
|
|
98
|
+
8, r + 2, r + 3,
|
|
89
99
|
]);
|
|
90
100
|
export const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -3,7 +3,7 @@ import { customEndpointFunctions, decideEndpoint, EndpointCache } from "@smithy/
|
|
|
3
3
|
import { bdd } from "./bdd";
|
|
4
4
|
const cache = new EndpointCache({
|
|
5
5
|
size: 50,
|
|
6
|
-
params: ["Endpoint", "IsControlPlane", "Region", "UseDualStack", "UseFIPS"],
|
|
6
|
+
params: ["Endpoint", "IsControlPlane", "IsOAuthEndpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
7
7
|
});
|
|
8
8
|
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
9
|
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
@@ -5,24 +5,32 @@ const _COATR = "CreateOAuth2TokenRequest";
|
|
|
5
5
|
const _COATRB = "CreateOAuth2TokenRequestBody";
|
|
6
6
|
const _COATRBr = "CreateOAuth2TokenResponseBody";
|
|
7
7
|
const _COATRr = "CreateOAuth2TokenResponse";
|
|
8
|
+
const _COATWIAM = "CreateOAuth2TokenWithIAM";
|
|
9
|
+
const _COATWIAMR = "CreateOAuth2TokenWithIAMRequest";
|
|
10
|
+
const _COATWIAMRr = "CreateOAuth2TokenWithIAMResponse";
|
|
8
11
|
const _ISE = "InternalServerException";
|
|
12
|
+
const _OAAT = "OAuthAccessToken";
|
|
9
13
|
const _RT = "RefreshToken";
|
|
10
14
|
const _TMRE = "TooManyRequestsError";
|
|
11
15
|
const _VE = "ValidationException";
|
|
12
16
|
const _aKI = "accessKeyId";
|
|
13
17
|
const _aT = "accessToken";
|
|
18
|
+
const _at = "access_token";
|
|
14
19
|
const _c = "client";
|
|
15
20
|
const _cI = "clientId";
|
|
16
21
|
const _cV = "codeVerifier";
|
|
17
22
|
const _co = "code";
|
|
18
23
|
const _e = "error";
|
|
19
24
|
const _eI = "expiresIn";
|
|
25
|
+
const _ei = "expires_in";
|
|
20
26
|
const _gT = "grantType";
|
|
27
|
+
const _gt = "grant_type";
|
|
21
28
|
const _h = "http";
|
|
22
29
|
const _hE = "httpError";
|
|
23
30
|
const _iT = "idToken";
|
|
24
31
|
const _jN = "jsonName";
|
|
25
32
|
const _m = "message";
|
|
33
|
+
const _r = "resource";
|
|
26
34
|
const _rT = "refreshToken";
|
|
27
35
|
const _rU = "redirectUri";
|
|
28
36
|
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.signin";
|
|
@@ -32,6 +40,7 @@ const _se = "server";
|
|
|
32
40
|
const _tI = "tokenInput";
|
|
33
41
|
const _tO = "tokenOutput";
|
|
34
42
|
const _tT = "tokenType";
|
|
43
|
+
const _tt = "token_type";
|
|
35
44
|
const n0 = "com.amazonaws.signin";
|
|
36
45
|
import { TypeRegistry } from "@smithy/core/schema";
|
|
37
46
|
import { AccessDeniedException, InternalServerException, TooManyRequestsError, ValidationException, } from "../models/errors";
|
|
@@ -68,6 +77,7 @@ export const errorTypeRegistries = [
|
|
|
68
77
|
_s_registry,
|
|
69
78
|
n0_registry,
|
|
70
79
|
];
|
|
80
|
+
var OAuthAccessToken = [0, n0, _OAAT, 8, 0];
|
|
71
81
|
var RefreshToken = [0, n0, _RT, 8, 0];
|
|
72
82
|
export var AccessToken$ = [3, n0, _AT,
|
|
73
83
|
8,
|
|
@@ -94,6 +104,19 @@ export var CreateOAuth2TokenResponseBody$ = [3, n0, _COATRBr,
|
|
|
94
104
|
[_aT, _tT, _eI, _rT, _iT],
|
|
95
105
|
[[() => AccessToken$, { [_jN]: _aT }], [0, { [_jN]: _tT }], [1, { [_jN]: _eI }], [() => RefreshToken, { [_jN]: _rT }], [0, { [_jN]: _iT }]], 4
|
|
96
106
|
];
|
|
107
|
+
export var CreateOAuth2TokenWithIAMRequest$ = [3, n0, _COATWIAMR,
|
|
108
|
+
0,
|
|
109
|
+
[_gT, _r],
|
|
110
|
+
[[0, { [_jN]: _gt }], 0], 2
|
|
111
|
+
];
|
|
112
|
+
export var CreateOAuth2TokenWithIAMResponse$ = [3, n0, _COATWIAMRr,
|
|
113
|
+
0,
|
|
114
|
+
[_aT, _tT, _eI],
|
|
115
|
+
[[() => OAuthAccessToken, { [_jN]: _at }], [0, { [_jN]: _tt }], [1, { [_jN]: _ei }]], 3
|
|
116
|
+
];
|
|
97
117
|
export var CreateOAuth2Token$ = [9, n0, _COAT,
|
|
98
118
|
{ [_h]: ["POST", "/v1/token", 200] }, () => CreateOAuth2TokenRequest$, () => CreateOAuth2TokenResponse$
|
|
99
119
|
];
|
|
120
|
+
export var CreateOAuth2TokenWithIAM$ = [9, n0, _COATWIAM,
|
|
121
|
+
{ [_h]: ["POST", "/v1/token?x-amz-client-auth-method=iam", 200] }, () => CreateOAuth2TokenWithIAMRequest$, () => CreateOAuth2TokenWithIAMResponse$
|
|
122
|
+
];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
2
|
import { type CreateOAuth2TokenCommandInput, type CreateOAuth2TokenCommandOutput } from "./commands/CreateOAuth2TokenCommand";
|
|
3
|
+
import { type CreateOAuth2TokenWithIAMCommandInput, type CreateOAuth2TokenWithIAMCommandOutput } from "./commands/CreateOAuth2TokenWithIAMCommand";
|
|
3
4
|
import { SigninClient } from "./SigninClient";
|
|
4
5
|
export interface Signin {
|
|
5
6
|
/**
|
|
@@ -8,6 +9,12 @@ export interface Signin {
|
|
|
8
9
|
createOAuth2Token(args: CreateOAuth2TokenCommandInput, options?: __HttpHandlerOptions): Promise<CreateOAuth2TokenCommandOutput>;
|
|
9
10
|
createOAuth2Token(args: CreateOAuth2TokenCommandInput, cb: (err: any, data?: CreateOAuth2TokenCommandOutput) => void): void;
|
|
10
11
|
createOAuth2Token(args: CreateOAuth2TokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateOAuth2TokenCommandOutput) => void): void;
|
|
12
|
+
/**
|
|
13
|
+
* @see {@link CreateOAuth2TokenWithIAMCommand}
|
|
14
|
+
*/
|
|
15
|
+
createOAuth2TokenWithIAM(args: CreateOAuth2TokenWithIAMCommandInput, options?: __HttpHandlerOptions): Promise<CreateOAuth2TokenWithIAMCommandOutput>;
|
|
16
|
+
createOAuth2TokenWithIAM(args: CreateOAuth2TokenWithIAMCommandInput, cb: (err: any, data?: CreateOAuth2TokenWithIAMCommandOutput) => void): void;
|
|
17
|
+
createOAuth2TokenWithIAM(args: CreateOAuth2TokenWithIAMCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateOAuth2TokenWithIAMCommandOutput) => void): void;
|
|
11
18
|
}
|
|
12
19
|
/**
|
|
13
20
|
* AWS Sign-In manages authentication for AWS services. This service provides
|
|
@@ -7,17 +7,18 @@ import { type RetryInputConfig, type RetryResolvedConfig } from "@smithy/core/re
|
|
|
7
7
|
import type { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
8
8
|
import { type HttpAuthSchemeInputConfig, type HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
9
9
|
import type { CreateOAuth2TokenCommandInput, CreateOAuth2TokenCommandOutput } from "./commands/CreateOAuth2TokenCommand";
|
|
10
|
+
import type { CreateOAuth2TokenWithIAMCommandInput, CreateOAuth2TokenWithIAMCommandOutput } from "./commands/CreateOAuth2TokenWithIAMCommand";
|
|
10
11
|
import { type ClientInputEndpointParameters, type ClientResolvedEndpointParameters, type EndpointParameters } from "./endpoint/EndpointParameters";
|
|
11
12
|
import { type RuntimeExtension, type RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
12
13
|
export { __Client };
|
|
13
14
|
/**
|
|
14
15
|
* @public
|
|
15
16
|
*/
|
|
16
|
-
export type ServiceInputTypes = CreateOAuth2TokenCommandInput;
|
|
17
|
+
export type ServiceInputTypes = CreateOAuth2TokenCommandInput | CreateOAuth2TokenWithIAMCommandInput;
|
|
17
18
|
/**
|
|
18
19
|
* @public
|
|
19
20
|
*/
|
|
20
|
-
export type ServiceOutputTypes = CreateOAuth2TokenCommandOutput;
|
|
21
|
+
export type ServiceOutputTypes = CreateOAuth2TokenCommandOutput | CreateOAuth2TokenWithIAMCommandOutput;
|
|
21
22
|
/**
|
|
22
23
|
* @public
|
|
23
24
|
*/
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import type { EndpointParameterInstructions } from "@smithy/types";
|
|
2
|
-
import type { SigninClientResolvedConfig } from "./SigninClient";
|
|
2
|
+
import type { ServiceInputTypes, ServiceOutputTypes, SigninClientResolvedConfig } from "./SigninClient";
|
|
3
3
|
/**
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
6
|
-
export declare const command: <I extends
|
|
7
|
-
new (input: I): import("@smithy/core/client").CommandImpl<I, O, SigninClientResolvedConfig,
|
|
8
|
-
new (...[input]: import("@smithy/types").OptionalParameter<I>): import("@smithy/core/client").CommandImpl<I, O, SigninClientResolvedConfig,
|
|
6
|
+
export declare const command: <I extends ServiceInputTypes, O extends ServiceOutputTypes>(added: EndpointParameterInstructions, plugins: (CommandCtor: any, clientStack: any, config: any, options: any) => import("@smithy/types").Pluggable<any, any>[], op: string, $: import("@smithy/types").StaticOperationSchema, smithyContext?: Record<string, unknown>) => {
|
|
7
|
+
new (input: I): import("@smithy/core/client").CommandImpl<I, O, SigninClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
8
|
+
new (...[input]: import("@smithy/types").OptionalParameter<I>): import("@smithy/core/client").CommandImpl<I, O, SigninClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
9
9
|
getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* @internal
|
|
13
13
|
*/
|
|
14
14
|
export declare const _ep0: EndpointParameterInstructions;
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const _ep1: EndpointParameterInstructions;
|
|
15
19
|
/**
|
|
16
20
|
* @internal
|
|
17
21
|
*/
|
|
@@ -19,8 +19,8 @@ export interface CreateOAuth2TokenCommandInput extends CreateOAuth2TokenRequest
|
|
|
19
19
|
export interface CreateOAuth2TokenCommandOutput extends CreateOAuth2TokenResponse, __MetadataBearer {
|
|
20
20
|
}
|
|
21
21
|
declare const CreateOAuth2TokenCommand_base: {
|
|
22
|
-
new (input: CreateOAuth2TokenCommandInput): import("@smithy/core/client").CommandImpl<CreateOAuth2TokenCommandInput, CreateOAuth2TokenCommandOutput, import("..").SigninClientResolvedConfig,
|
|
23
|
-
new (input: CreateOAuth2TokenCommandInput): import("@smithy/core/client").CommandImpl<CreateOAuth2TokenCommandInput, CreateOAuth2TokenCommandOutput, import("..").SigninClientResolvedConfig,
|
|
22
|
+
new (input: CreateOAuth2TokenCommandInput): import("@smithy/core/client").CommandImpl<CreateOAuth2TokenCommandInput, CreateOAuth2TokenCommandOutput, import("..").SigninClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
|
|
23
|
+
new (input: CreateOAuth2TokenCommandInput): import("@smithy/core/client").CommandImpl<CreateOAuth2TokenCommandInput, CreateOAuth2TokenCommandOutput, import("..").SigninClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
|
|
24
24
|
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
2
|
+
import type { CreateOAuth2TokenWithIAMRequest, CreateOAuth2TokenWithIAMResponse } from "../models/models_0";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type { __MetadataBearer };
|
|
7
|
+
/**
|
|
8
|
+
* @public
|
|
9
|
+
*
|
|
10
|
+
* The input for {@link CreateOAuth2TokenWithIAMCommand}.
|
|
11
|
+
*/
|
|
12
|
+
export interface CreateOAuth2TokenWithIAMCommandInput extends CreateOAuth2TokenWithIAMRequest {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*
|
|
17
|
+
* The output of {@link CreateOAuth2TokenWithIAMCommand}.
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateOAuth2TokenWithIAMCommandOutput extends CreateOAuth2TokenWithIAMResponse, __MetadataBearer {
|
|
20
|
+
}
|
|
21
|
+
declare const CreateOAuth2TokenWithIAMCommand_base: {
|
|
22
|
+
new (input: CreateOAuth2TokenWithIAMCommandInput): import("@smithy/core/client").CommandImpl<CreateOAuth2TokenWithIAMCommandInput, CreateOAuth2TokenWithIAMCommandOutput, import("..").SigninClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
|
|
23
|
+
new (input: CreateOAuth2TokenWithIAMCommandInput): import("@smithy/core/client").CommandImpl<CreateOAuth2TokenWithIAMCommandInput, CreateOAuth2TokenWithIAMCommandOutput, import("..").SigninClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
|
|
24
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Grants permission to exchange client credentials for an OAuth 2.0 access token
|
|
28
|
+
* scoped to a resource that can be used to access AWS services from applications
|
|
29
|
+
* @example
|
|
30
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
31
|
+
* ```javascript
|
|
32
|
+
* import { SigninClient, CreateOAuth2TokenWithIAMCommand } from "@aws-sdk/client-signin"; // ES Modules import
|
|
33
|
+
* // const { SigninClient, CreateOAuth2TokenWithIAMCommand } = require("@aws-sdk/client-signin"); // CommonJS import
|
|
34
|
+
* // import type { SigninClientConfig } from "@aws-sdk/client-signin";
|
|
35
|
+
* const config = {}; // type is SigninClientConfig
|
|
36
|
+
* const client = new SigninClient(config);
|
|
37
|
+
* const input = { // CreateOAuth2TokenWithIAMRequest
|
|
38
|
+
* grantType: "STRING_VALUE", // required
|
|
39
|
+
* resource: "STRING_VALUE", // required
|
|
40
|
+
* };
|
|
41
|
+
* const command = new CreateOAuth2TokenWithIAMCommand(input);
|
|
42
|
+
* const response = await client.send(command);
|
|
43
|
+
* // { // CreateOAuth2TokenWithIAMResponse
|
|
44
|
+
* // accessToken: "STRING_VALUE", // required
|
|
45
|
+
* // tokenType: "STRING_VALUE", // required
|
|
46
|
+
* // expiresIn: Number("int"), // required
|
|
47
|
+
* // };
|
|
48
|
+
*
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @param CreateOAuth2TokenWithIAMCommandInput - {@link CreateOAuth2TokenWithIAMCommandInput}
|
|
52
|
+
* @returns {@link CreateOAuth2TokenWithIAMCommandOutput}
|
|
53
|
+
* @see {@link CreateOAuth2TokenWithIAMCommandInput} for command's `input` shape.
|
|
54
|
+
* @see {@link CreateOAuth2TokenWithIAMCommandOutput} for command's `response` shape.
|
|
55
|
+
* @see {@link SigninClientResolvedConfig | config} for SigninClient's `config` shape.
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
58
|
+
* Error thrown for access denied scenarios with flexible HTTP status mapping
|
|
59
|
+
*
|
|
60
|
+
* Runtime HTTP Status Code Mapping:
|
|
61
|
+
* - HTTP 401 (Unauthorized): TOKEN_EXPIRED, AUTHCODE_EXPIRED
|
|
62
|
+
* - HTTP 403 (Forbidden): USER_CREDENTIALS_CHANGED, INSUFFICIENT_PERMISSIONS
|
|
63
|
+
*
|
|
64
|
+
* The specific HTTP status code is determined at runtime based on the error enum value.
|
|
65
|
+
* Consumers should use the error field to determine the specific access denial reason.
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link InternalServerException} (server fault)
|
|
68
|
+
* Error thrown when an internal server error occurs
|
|
69
|
+
*
|
|
70
|
+
* HTTP Status Code: 500 Internal Server Error
|
|
71
|
+
*
|
|
72
|
+
* Used for unexpected server-side errors that prevent request processing.
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link TooManyRequestsError} (client fault)
|
|
75
|
+
* Error thrown when rate limit is exceeded
|
|
76
|
+
*
|
|
77
|
+
* HTTP Status Code: 429 Too Many Requests
|
|
78
|
+
*
|
|
79
|
+
* Possible OAuth2ErrorCode values:
|
|
80
|
+
* - INVALID_REQUEST: Rate limiting, too many requests, abuse prevention
|
|
81
|
+
*
|
|
82
|
+
* Possible causes:
|
|
83
|
+
* - Too many token requests from the same client
|
|
84
|
+
* - Rate limiting based on client_id or IP address
|
|
85
|
+
* - Abuse prevention mechanisms triggered
|
|
86
|
+
* - Service protection against excessive token generation
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link ValidationException} (client fault)
|
|
89
|
+
* Error thrown when request validation fails
|
|
90
|
+
*
|
|
91
|
+
* HTTP Status Code: 400 Bad Request
|
|
92
|
+
*
|
|
93
|
+
* Used for request validation errors such as malformed parameters,
|
|
94
|
+
* missing required fields, or invalid parameter values.
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link SigninServiceException}
|
|
97
|
+
* <p>Base exception class for all service exceptions from Signin service.</p>
|
|
98
|
+
*
|
|
99
|
+
*
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
export declare class CreateOAuth2TokenWithIAMCommand extends CreateOAuth2TokenWithIAMCommand_base {
|
|
103
|
+
/** @internal type navigation helper, not in runtime. */
|
|
104
|
+
protected static __types: {
|
|
105
|
+
api: {
|
|
106
|
+
input: CreateOAuth2TokenWithIAMRequest;
|
|
107
|
+
output: CreateOAuth2TokenWithIAMResponse;
|
|
108
|
+
};
|
|
109
|
+
sdk: {
|
|
110
|
+
input: CreateOAuth2TokenWithIAMCommandInput;
|
|
111
|
+
output: CreateOAuth2TokenWithIAMCommandOutput;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AWS credentials structure containing temporary access credentials
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* Scoping down will be based on CLI policy (CLI team needs to create it).
|
|
6
|
-
* Similar to cloud shell implementation.
|
|
4
|
+
* Scoped, temporary AWS credentials with a 15-minute duration.
|
|
7
5
|
* @public
|
|
8
6
|
*/
|
|
9
7
|
export interface AccessToken {
|
|
@@ -140,3 +138,43 @@ export interface CreateOAuth2TokenResponse {
|
|
|
140
138
|
*/
|
|
141
139
|
tokenOutput: CreateOAuth2TokenResponseBody | undefined;
|
|
142
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Input structure for CreateOAuth2TokenWithIAM operation
|
|
143
|
+
* @public
|
|
144
|
+
*/
|
|
145
|
+
export interface CreateOAuth2TokenWithIAMRequest {
|
|
146
|
+
/**
|
|
147
|
+
* OAuth 2.0 grant type. Must be "client_credentials".
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
grantType: string | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* The OAuth resource for which the access token is requested.
|
|
153
|
+
* Example: "aws-mcp.amazonaws.com".
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
156
|
+
resource: string | undefined;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Output structure for CreateOAuth2TokenWithIAM operation
|
|
160
|
+
*
|
|
161
|
+
* Contains the JWT access token, token type, and expiration per RFC 6749 §5.1.
|
|
162
|
+
* @public
|
|
163
|
+
*/
|
|
164
|
+
export interface CreateOAuth2TokenWithIAMResponse {
|
|
165
|
+
/**
|
|
166
|
+
* JWT access token containing principal identity, resource scope, and session metadata
|
|
167
|
+
* @public
|
|
168
|
+
*/
|
|
169
|
+
accessToken: string | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* Always "Bearer" per OAuth 2.1 specification
|
|
172
|
+
* @public
|
|
173
|
+
*/
|
|
174
|
+
tokenType: string | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* Token lifetime in seconds. Value is the minimum of session validity and 1 hour.
|
|
177
|
+
* @public
|
|
178
|
+
*/
|
|
179
|
+
expiresIn: number | undefined;
|
|
180
|
+
}
|
|
@@ -16,4 +16,7 @@ export declare var CreateOAuth2TokenRequest$: StaticStructureSchema;
|
|
|
16
16
|
export declare var CreateOAuth2TokenRequestBody$: StaticStructureSchema;
|
|
17
17
|
export declare var CreateOAuth2TokenResponse$: StaticStructureSchema;
|
|
18
18
|
export declare var CreateOAuth2TokenResponseBody$: StaticStructureSchema;
|
|
19
|
+
export declare var CreateOAuth2TokenWithIAMRequest$: StaticStructureSchema;
|
|
20
|
+
export declare var CreateOAuth2TokenWithIAMResponse$: StaticStructureSchema;
|
|
19
21
|
export declare var CreateOAuth2Token$: StaticOperationSchema;
|
|
22
|
+
export declare var CreateOAuth2TokenWithIAM$: StaticOperationSchema;
|
|
@@ -3,6 +3,10 @@ import {
|
|
|
3
3
|
CreateOAuth2TokenCommandInput,
|
|
4
4
|
CreateOAuth2TokenCommandOutput,
|
|
5
5
|
} from "./commands/CreateOAuth2TokenCommand";
|
|
6
|
+
import {
|
|
7
|
+
CreateOAuth2TokenWithIAMCommandInput,
|
|
8
|
+
CreateOAuth2TokenWithIAMCommandOutput,
|
|
9
|
+
} from "./commands/CreateOAuth2TokenWithIAMCommand";
|
|
6
10
|
import { SigninClient } from "./SigninClient";
|
|
7
11
|
export interface Signin {
|
|
8
12
|
createOAuth2Token(
|
|
@@ -18,5 +22,18 @@ export interface Signin {
|
|
|
18
22
|
options: __HttpHandlerOptions,
|
|
19
23
|
cb: (err: any, data?: CreateOAuth2TokenCommandOutput) => void
|
|
20
24
|
): void;
|
|
25
|
+
createOAuth2TokenWithIAM(
|
|
26
|
+
args: CreateOAuth2TokenWithIAMCommandInput,
|
|
27
|
+
options?: __HttpHandlerOptions
|
|
28
|
+
): Promise<CreateOAuth2TokenWithIAMCommandOutput>;
|
|
29
|
+
createOAuth2TokenWithIAM(
|
|
30
|
+
args: CreateOAuth2TokenWithIAMCommandInput,
|
|
31
|
+
cb: (err: any, data?: CreateOAuth2TokenWithIAMCommandOutput) => void
|
|
32
|
+
): void;
|
|
33
|
+
createOAuth2TokenWithIAM(
|
|
34
|
+
args: CreateOAuth2TokenWithIAMCommandInput,
|
|
35
|
+
options: __HttpHandlerOptions,
|
|
36
|
+
cb: (err: any, data?: CreateOAuth2TokenWithIAMCommandOutput) => void
|
|
37
|
+
): void;
|
|
21
38
|
}
|
|
22
39
|
export declare class Signin extends SigninClient implements Signin {}
|
|
@@ -40,6 +40,10 @@ import {
|
|
|
40
40
|
CreateOAuth2TokenCommandInput,
|
|
41
41
|
CreateOAuth2TokenCommandOutput,
|
|
42
42
|
} from "./commands/CreateOAuth2TokenCommand";
|
|
43
|
+
import {
|
|
44
|
+
CreateOAuth2TokenWithIAMCommandInput,
|
|
45
|
+
CreateOAuth2TokenWithIAMCommandOutput,
|
|
46
|
+
} from "./commands/CreateOAuth2TokenWithIAMCommand";
|
|
43
47
|
import {
|
|
44
48
|
ClientInputEndpointParameters,
|
|
45
49
|
ClientResolvedEndpointParameters,
|
|
@@ -47,8 +51,12 @@ import {
|
|
|
47
51
|
} from "./endpoint/EndpointParameters";
|
|
48
52
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
49
53
|
export { __Client };
|
|
50
|
-
export type ServiceInputTypes =
|
|
51
|
-
|
|
54
|
+
export type ServiceInputTypes =
|
|
55
|
+
| CreateOAuth2TokenCommandInput
|
|
56
|
+
| CreateOAuth2TokenWithIAMCommandInput;
|
|
57
|
+
export type ServiceOutputTypes =
|
|
58
|
+
| CreateOAuth2TokenCommandOutput
|
|
59
|
+
| CreateOAuth2TokenWithIAMCommandOutput;
|
|
52
60
|
export interface ClientDefaults
|
|
53
61
|
extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
|
|
54
62
|
requestHandler?: __HttpHandlerUserInput;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { EndpointParameterInstructions } from "@smithy/types";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ServiceInputTypes,
|
|
4
|
+
ServiceOutputTypes,
|
|
5
|
+
SigninClientResolvedConfig,
|
|
6
|
+
} from "./SigninClient";
|
|
3
7
|
export declare const command: <
|
|
4
|
-
I extends
|
|
5
|
-
O extends
|
|
8
|
+
I extends ServiceInputTypes,
|
|
9
|
+
O extends ServiceOutputTypes
|
|
6
10
|
>(
|
|
7
11
|
added: EndpointParameterInstructions,
|
|
8
12
|
plugins: (
|
|
@@ -19,8 +23,8 @@ export declare const command: <
|
|
|
19
23
|
I,
|
|
20
24
|
O,
|
|
21
25
|
SigninClientResolvedConfig,
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
ServiceInputTypes,
|
|
27
|
+
ServiceOutputTypes
|
|
24
28
|
>;
|
|
25
29
|
new (
|
|
26
30
|
...[input]: import("@smithy/types").OptionalParameter<I>
|
|
@@ -28,12 +32,13 @@ export declare const command: <
|
|
|
28
32
|
I,
|
|
29
33
|
O,
|
|
30
34
|
SigninClientResolvedConfig,
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
ServiceInputTypes,
|
|
36
|
+
ServiceOutputTypes
|
|
33
37
|
>;
|
|
34
38
|
getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
35
39
|
};
|
|
36
40
|
export declare const _ep0: EndpointParameterInstructions;
|
|
41
|
+
export declare const _ep1: EndpointParameterInstructions;
|
|
37
42
|
export declare const _mw0: (
|
|
38
43
|
Command: any,
|
|
39
44
|
cs: any,
|
|
@@ -16,8 +16,8 @@ declare const CreateOAuth2TokenCommand_base: {
|
|
|
16
16
|
CreateOAuth2TokenCommandInput,
|
|
17
17
|
CreateOAuth2TokenCommandOutput,
|
|
18
18
|
import("..").SigninClientResolvedConfig,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
import("..").ServiceInputTypes,
|
|
20
|
+
import("..").ServiceOutputTypes
|
|
21
21
|
>;
|
|
22
22
|
new (
|
|
23
23
|
input: CreateOAuth2TokenCommandInput
|
|
@@ -25,8 +25,8 @@ declare const CreateOAuth2TokenCommand_base: {
|
|
|
25
25
|
CreateOAuth2TokenCommandInput,
|
|
26
26
|
CreateOAuth2TokenCommandOutput,
|
|
27
27
|
import("..").SigninClientResolvedConfig,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
import("..").ServiceInputTypes,
|
|
29
|
+
import("..").ServiceOutputTypes
|
|
30
30
|
>;
|
|
31
31
|
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
32
32
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
2
|
+
import {
|
|
3
|
+
CreateOAuth2TokenWithIAMRequest,
|
|
4
|
+
CreateOAuth2TokenWithIAMResponse,
|
|
5
|
+
} from "../models/models_0";
|
|
6
|
+
export { __MetadataBearer };
|
|
7
|
+
export interface CreateOAuth2TokenWithIAMCommandInput
|
|
8
|
+
extends CreateOAuth2TokenWithIAMRequest {}
|
|
9
|
+
export interface CreateOAuth2TokenWithIAMCommandOutput
|
|
10
|
+
extends CreateOAuth2TokenWithIAMResponse,
|
|
11
|
+
__MetadataBearer {}
|
|
12
|
+
declare const CreateOAuth2TokenWithIAMCommand_base: {
|
|
13
|
+
new (
|
|
14
|
+
input: CreateOAuth2TokenWithIAMCommandInput
|
|
15
|
+
): import("@smithy/core/client").CommandImpl<
|
|
16
|
+
CreateOAuth2TokenWithIAMCommandInput,
|
|
17
|
+
CreateOAuth2TokenWithIAMCommandOutput,
|
|
18
|
+
import("..").SigninClientResolvedConfig,
|
|
19
|
+
import("..").ServiceInputTypes,
|
|
20
|
+
import("..").ServiceOutputTypes
|
|
21
|
+
>;
|
|
22
|
+
new (
|
|
23
|
+
input: CreateOAuth2TokenWithIAMCommandInput
|
|
24
|
+
): import("@smithy/core/client").CommandImpl<
|
|
25
|
+
CreateOAuth2TokenWithIAMCommandInput,
|
|
26
|
+
CreateOAuth2TokenWithIAMCommandOutput,
|
|
27
|
+
import("..").SigninClientResolvedConfig,
|
|
28
|
+
import("..").ServiceInputTypes,
|
|
29
|
+
import("..").ServiceOutputTypes
|
|
30
|
+
>;
|
|
31
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
32
|
+
};
|
|
33
|
+
export declare class CreateOAuth2TokenWithIAMCommand extends CreateOAuth2TokenWithIAMCommand_base {
|
|
34
|
+
protected static __types: {
|
|
35
|
+
api: {
|
|
36
|
+
input: CreateOAuth2TokenWithIAMRequest;
|
|
37
|
+
output: CreateOAuth2TokenWithIAMResponse;
|
|
38
|
+
};
|
|
39
|
+
sdk: {
|
|
40
|
+
input: CreateOAuth2TokenWithIAMCommandInput;
|
|
41
|
+
output: CreateOAuth2TokenWithIAMCommandOutput;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -24,3 +24,12 @@ export interface CreateOAuth2TokenResponseBody {
|
|
|
24
24
|
export interface CreateOAuth2TokenResponse {
|
|
25
25
|
tokenOutput: CreateOAuth2TokenResponseBody | undefined;
|
|
26
26
|
}
|
|
27
|
+
export interface CreateOAuth2TokenWithIAMRequest {
|
|
28
|
+
grantType: string | undefined;
|
|
29
|
+
resource: string | undefined;
|
|
30
|
+
}
|
|
31
|
+
export interface CreateOAuth2TokenWithIAMResponse {
|
|
32
|
+
accessToken: string | undefined;
|
|
33
|
+
tokenType: string | undefined;
|
|
34
|
+
expiresIn: number | undefined;
|
|
35
|
+
}
|
|
@@ -15,4 +15,7 @@ export declare var CreateOAuth2TokenRequest$: StaticStructureSchema;
|
|
|
15
15
|
export declare var CreateOAuth2TokenRequestBody$: StaticStructureSchema;
|
|
16
16
|
export declare var CreateOAuth2TokenResponse$: StaticStructureSchema;
|
|
17
17
|
export declare var CreateOAuth2TokenResponseBody$: StaticStructureSchema;
|
|
18
|
+
export declare var CreateOAuth2TokenWithIAMRequest$: StaticStructureSchema;
|
|
19
|
+
export declare var CreateOAuth2TokenWithIAMResponse$: StaticStructureSchema;
|
|
18
20
|
export declare var CreateOAuth2Token$: StaticOperationSchema;
|
|
21
|
+
export declare var CreateOAuth2TokenWithIAM$: StaticOperationSchema;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/nested-clients",
|
|
3
|
-
"version": "3.997.
|
|
3
|
+
"version": "3.997.32",
|
|
4
4
|
"description": "Nested clients for AWS SDK packages.",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
},
|
|
29
29
|
"license": "Apache-2.0",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aws-sdk/core": "^3.975.
|
|
32
|
-
"@aws-sdk/signature-v4-multi-region": "^3.996.
|
|
33
|
-
"@aws-sdk/types": "^3.974.
|
|
34
|
-
"@smithy/core": "^3.29.
|
|
35
|
-
"@smithy/fetch-http-handler": "^5.6.
|
|
36
|
-
"@smithy/node-http-handler": "^4.9.
|
|
37
|
-
"@smithy/types": "^4.16.
|
|
31
|
+
"@aws-sdk/core": "^3.975.2",
|
|
32
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.40",
|
|
33
|
+
"@aws-sdk/types": "^3.974.1",
|
|
34
|
+
"@smithy/core": "^3.29.3",
|
|
35
|
+
"@smithy/fetch-http-handler": "^5.6.5",
|
|
36
|
+
"@smithy/node-http-handler": "^4.9.5",
|
|
37
|
+
"@smithy/types": "^4.16.1",
|
|
38
38
|
"tslib": "^2.6.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -47,6 +47,9 @@
|
|
|
47
47
|
"<4.5": {
|
|
48
48
|
"dist-types/*": [
|
|
49
49
|
"dist-types/ts3.4/*"
|
|
50
|
+
],
|
|
51
|
+
"*": [
|
|
52
|
+
"dist-types/ts3.4/submodules/*/index.d.ts"
|
|
50
53
|
]
|
|
51
54
|
}
|
|
52
55
|
},
|