terratest 1.0.1
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/README.md +78 -0
- package/dist/action/136.index.js +990 -0
- package/dist/action/360.index.js +92 -0
- package/dist/action/443.index.js +724 -0
- package/dist/action/449.index.js +13 -0
- package/dist/action/566.index.js +385 -0
- package/dist/action/605.index.js +241 -0
- package/dist/action/762.index.js +583 -0
- package/dist/action/869.index.js +529 -0
- package/dist/action/956.index.js +117 -0
- package/dist/action/998.index.js +894 -0
- package/dist/action/index.js +18 -0
- package/dist/cli/136.index.js +990 -0
- package/dist/cli/360.index.js +92 -0
- package/dist/cli/443.index.js +724 -0
- package/dist/cli/449.index.js +13 -0
- package/dist/cli/566.index.js +385 -0
- package/dist/cli/605.index.js +241 -0
- package/dist/cli/762.index.js +583 -0
- package/dist/cli/869.index.js +529 -0
- package/dist/cli/956.index.js +117 -0
- package/dist/cli/998.index.js +894 -0
- package/dist/cli/index.js +17 -0
- package/package.json +36 -0
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 443;
|
|
3
|
+
exports.ids = [443];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 89443:
|
|
7
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
var __webpack_unused_export__;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var client$1 = __webpack_require__(5152);
|
|
13
|
+
var core = __webpack_require__(90402);
|
|
14
|
+
var client = __webpack_require__(92658);
|
|
15
|
+
var config = __webpack_require__(47291);
|
|
16
|
+
var endpoints = __webpack_require__(62085);
|
|
17
|
+
var protocols = __webpack_require__(93422);
|
|
18
|
+
var retry = __webpack_require__(23609);
|
|
19
|
+
var schema = __webpack_require__(26890);
|
|
20
|
+
var httpAuthSchemes = __webpack_require__(97523);
|
|
21
|
+
var serde = __webpack_require__(92430);
|
|
22
|
+
var nodeHttpHandler = __webpack_require__(61279);
|
|
23
|
+
var protocols$1 = __webpack_require__(37288);
|
|
24
|
+
|
|
25
|
+
const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
26
|
+
return {
|
|
27
|
+
operation: client.getSmithyContext(context).operation,
|
|
28
|
+
region: (await client.normalizeProvider(config.region)()) ||
|
|
29
|
+
(() => {
|
|
30
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
31
|
+
})(),
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
35
|
+
return {
|
|
36
|
+
schemeId: "aws.auth#sigv4",
|
|
37
|
+
signingProperties: {
|
|
38
|
+
name: "sso-oauth",
|
|
39
|
+
region: authParameters.region,
|
|
40
|
+
},
|
|
41
|
+
propertiesExtractor: (config, context) => ({
|
|
42
|
+
signingProperties: {
|
|
43
|
+
config,
|
|
44
|
+
context,
|
|
45
|
+
},
|
|
46
|
+
}),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
|
50
|
+
return {
|
|
51
|
+
schemeId: "smithy.api#noAuth",
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {
|
|
55
|
+
const options = [];
|
|
56
|
+
switch (authParameters.operation) {
|
|
57
|
+
case "CreateToken": {
|
|
58
|
+
options.push(createSmithyApiNoAuthHttpAuthOption());
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
default: {
|
|
62
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return options;
|
|
66
|
+
};
|
|
67
|
+
const resolveHttpAuthSchemeConfig = (config) => {
|
|
68
|
+
const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);
|
|
69
|
+
return Object.assign(config_0, {
|
|
70
|
+
authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const resolveClientEndpointParameters = (options) => {
|
|
75
|
+
return Object.assign(options, {
|
|
76
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
77
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
78
|
+
defaultSigningName: "sso-oauth",
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
const commonParams = {
|
|
82
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
83
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
84
|
+
Region: { type: "builtInParams", name: "region" },
|
|
85
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
var version = "3.997.11";
|
|
89
|
+
var packageInfo = {
|
|
90
|
+
version: version};
|
|
91
|
+
|
|
92
|
+
const k = "ref";
|
|
93
|
+
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
|
|
94
|
+
const _data = {
|
|
95
|
+
conditions: [
|
|
96
|
+
[c, [g]],
|
|
97
|
+
[c, j],
|
|
98
|
+
["aws.partition", j, d],
|
|
99
|
+
[e, [{ [k]: "UseFIPS" }, b]],
|
|
100
|
+
[e, [{ [k]: "UseDualStack" }, b]],
|
|
101
|
+
[e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
|
|
102
|
+
[e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]],
|
|
103
|
+
["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]],
|
|
104
|
+
],
|
|
105
|
+
results: [
|
|
106
|
+
[a],
|
|
107
|
+
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
108
|
+
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
109
|
+
[g, i],
|
|
110
|
+
["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
111
|
+
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
112
|
+
["https://oidc.{Region}.amazonaws.com", i],
|
|
113
|
+
["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
114
|
+
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
115
|
+
["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
116
|
+
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
117
|
+
["https://oidc.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
118
|
+
[a, "Invalid Configuration: Missing Region"],
|
|
119
|
+
],
|
|
120
|
+
};
|
|
121
|
+
const root = 2;
|
|
122
|
+
const r = 100_000_000;
|
|
123
|
+
const nodes = new Int32Array([
|
|
124
|
+
-1,
|
|
125
|
+
1,
|
|
126
|
+
-1,
|
|
127
|
+
0,
|
|
128
|
+
13,
|
|
129
|
+
3,
|
|
130
|
+
1,
|
|
131
|
+
4,
|
|
132
|
+
r + 12,
|
|
133
|
+
2,
|
|
134
|
+
5,
|
|
135
|
+
r + 12,
|
|
136
|
+
3,
|
|
137
|
+
8,
|
|
138
|
+
6,
|
|
139
|
+
4,
|
|
140
|
+
7,
|
|
141
|
+
r + 11,
|
|
142
|
+
5,
|
|
143
|
+
r + 9,
|
|
144
|
+
r + 10,
|
|
145
|
+
4,
|
|
146
|
+
11,
|
|
147
|
+
9,
|
|
148
|
+
6,
|
|
149
|
+
10,
|
|
150
|
+
r + 8,
|
|
151
|
+
7,
|
|
152
|
+
r + 6,
|
|
153
|
+
r + 7,
|
|
154
|
+
5,
|
|
155
|
+
12,
|
|
156
|
+
r + 5,
|
|
157
|
+
6,
|
|
158
|
+
r + 4,
|
|
159
|
+
r + 5,
|
|
160
|
+
3,
|
|
161
|
+
r + 1,
|
|
162
|
+
14,
|
|
163
|
+
4,
|
|
164
|
+
r + 2,
|
|
165
|
+
r + 3,
|
|
166
|
+
]);
|
|
167
|
+
const bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
168
|
+
|
|
169
|
+
const cache = new endpoints.EndpointCache({
|
|
170
|
+
size: 50,
|
|
171
|
+
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
172
|
+
});
|
|
173
|
+
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
174
|
+
return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {
|
|
175
|
+
endpointParams: endpointParams,
|
|
176
|
+
logger: context.logger,
|
|
177
|
+
}));
|
|
178
|
+
};
|
|
179
|
+
endpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;
|
|
180
|
+
|
|
181
|
+
class SSOOIDCServiceException extends client.ServiceException {
|
|
182
|
+
constructor(options) {
|
|
183
|
+
super(options);
|
|
184
|
+
Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
class AccessDeniedException extends SSOOIDCServiceException {
|
|
189
|
+
name = "AccessDeniedException";
|
|
190
|
+
$fault = "client";
|
|
191
|
+
error;
|
|
192
|
+
reason;
|
|
193
|
+
error_description;
|
|
194
|
+
constructor(opts) {
|
|
195
|
+
super({
|
|
196
|
+
name: "AccessDeniedException",
|
|
197
|
+
$fault: "client",
|
|
198
|
+
...opts,
|
|
199
|
+
});
|
|
200
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
201
|
+
this.error = opts.error;
|
|
202
|
+
this.reason = opts.reason;
|
|
203
|
+
this.error_description = opts.error_description;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
class AuthorizationPendingException extends SSOOIDCServiceException {
|
|
207
|
+
name = "AuthorizationPendingException";
|
|
208
|
+
$fault = "client";
|
|
209
|
+
error;
|
|
210
|
+
error_description;
|
|
211
|
+
constructor(opts) {
|
|
212
|
+
super({
|
|
213
|
+
name: "AuthorizationPendingException",
|
|
214
|
+
$fault: "client",
|
|
215
|
+
...opts,
|
|
216
|
+
});
|
|
217
|
+
Object.setPrototypeOf(this, AuthorizationPendingException.prototype);
|
|
218
|
+
this.error = opts.error;
|
|
219
|
+
this.error_description = opts.error_description;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
class ExpiredTokenException extends SSOOIDCServiceException {
|
|
223
|
+
name = "ExpiredTokenException";
|
|
224
|
+
$fault = "client";
|
|
225
|
+
error;
|
|
226
|
+
error_description;
|
|
227
|
+
constructor(opts) {
|
|
228
|
+
super({
|
|
229
|
+
name: "ExpiredTokenException",
|
|
230
|
+
$fault: "client",
|
|
231
|
+
...opts,
|
|
232
|
+
});
|
|
233
|
+
Object.setPrototypeOf(this, ExpiredTokenException.prototype);
|
|
234
|
+
this.error = opts.error;
|
|
235
|
+
this.error_description = opts.error_description;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
class InternalServerException extends SSOOIDCServiceException {
|
|
239
|
+
name = "InternalServerException";
|
|
240
|
+
$fault = "server";
|
|
241
|
+
error;
|
|
242
|
+
error_description;
|
|
243
|
+
constructor(opts) {
|
|
244
|
+
super({
|
|
245
|
+
name: "InternalServerException",
|
|
246
|
+
$fault: "server",
|
|
247
|
+
...opts,
|
|
248
|
+
});
|
|
249
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
250
|
+
this.error = opts.error;
|
|
251
|
+
this.error_description = opts.error_description;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
class InvalidClientException extends SSOOIDCServiceException {
|
|
255
|
+
name = "InvalidClientException";
|
|
256
|
+
$fault = "client";
|
|
257
|
+
error;
|
|
258
|
+
error_description;
|
|
259
|
+
constructor(opts) {
|
|
260
|
+
super({
|
|
261
|
+
name: "InvalidClientException",
|
|
262
|
+
$fault: "client",
|
|
263
|
+
...opts,
|
|
264
|
+
});
|
|
265
|
+
Object.setPrototypeOf(this, InvalidClientException.prototype);
|
|
266
|
+
this.error = opts.error;
|
|
267
|
+
this.error_description = opts.error_description;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
class InvalidGrantException extends SSOOIDCServiceException {
|
|
271
|
+
name = "InvalidGrantException";
|
|
272
|
+
$fault = "client";
|
|
273
|
+
error;
|
|
274
|
+
error_description;
|
|
275
|
+
constructor(opts) {
|
|
276
|
+
super({
|
|
277
|
+
name: "InvalidGrantException",
|
|
278
|
+
$fault: "client",
|
|
279
|
+
...opts,
|
|
280
|
+
});
|
|
281
|
+
Object.setPrototypeOf(this, InvalidGrantException.prototype);
|
|
282
|
+
this.error = opts.error;
|
|
283
|
+
this.error_description = opts.error_description;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
class InvalidRequestException extends SSOOIDCServiceException {
|
|
287
|
+
name = "InvalidRequestException";
|
|
288
|
+
$fault = "client";
|
|
289
|
+
error;
|
|
290
|
+
reason;
|
|
291
|
+
error_description;
|
|
292
|
+
constructor(opts) {
|
|
293
|
+
super({
|
|
294
|
+
name: "InvalidRequestException",
|
|
295
|
+
$fault: "client",
|
|
296
|
+
...opts,
|
|
297
|
+
});
|
|
298
|
+
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
|
299
|
+
this.error = opts.error;
|
|
300
|
+
this.reason = opts.reason;
|
|
301
|
+
this.error_description = opts.error_description;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
class InvalidScopeException extends SSOOIDCServiceException {
|
|
305
|
+
name = "InvalidScopeException";
|
|
306
|
+
$fault = "client";
|
|
307
|
+
error;
|
|
308
|
+
error_description;
|
|
309
|
+
constructor(opts) {
|
|
310
|
+
super({
|
|
311
|
+
name: "InvalidScopeException",
|
|
312
|
+
$fault: "client",
|
|
313
|
+
...opts,
|
|
314
|
+
});
|
|
315
|
+
Object.setPrototypeOf(this, InvalidScopeException.prototype);
|
|
316
|
+
this.error = opts.error;
|
|
317
|
+
this.error_description = opts.error_description;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
class SlowDownException extends SSOOIDCServiceException {
|
|
321
|
+
name = "SlowDownException";
|
|
322
|
+
$fault = "client";
|
|
323
|
+
error;
|
|
324
|
+
error_description;
|
|
325
|
+
constructor(opts) {
|
|
326
|
+
super({
|
|
327
|
+
name: "SlowDownException",
|
|
328
|
+
$fault: "client",
|
|
329
|
+
...opts,
|
|
330
|
+
});
|
|
331
|
+
Object.setPrototypeOf(this, SlowDownException.prototype);
|
|
332
|
+
this.error = opts.error;
|
|
333
|
+
this.error_description = opts.error_description;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
class UnauthorizedClientException extends SSOOIDCServiceException {
|
|
337
|
+
name = "UnauthorizedClientException";
|
|
338
|
+
$fault = "client";
|
|
339
|
+
error;
|
|
340
|
+
error_description;
|
|
341
|
+
constructor(opts) {
|
|
342
|
+
super({
|
|
343
|
+
name: "UnauthorizedClientException",
|
|
344
|
+
$fault: "client",
|
|
345
|
+
...opts,
|
|
346
|
+
});
|
|
347
|
+
Object.setPrototypeOf(this, UnauthorizedClientException.prototype);
|
|
348
|
+
this.error = opts.error;
|
|
349
|
+
this.error_description = opts.error_description;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
class UnsupportedGrantTypeException extends SSOOIDCServiceException {
|
|
353
|
+
name = "UnsupportedGrantTypeException";
|
|
354
|
+
$fault = "client";
|
|
355
|
+
error;
|
|
356
|
+
error_description;
|
|
357
|
+
constructor(opts) {
|
|
358
|
+
super({
|
|
359
|
+
name: "UnsupportedGrantTypeException",
|
|
360
|
+
$fault: "client",
|
|
361
|
+
...opts,
|
|
362
|
+
});
|
|
363
|
+
Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype);
|
|
364
|
+
this.error = opts.error;
|
|
365
|
+
this.error_description = opts.error_description;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
const _ADE = "AccessDeniedException";
|
|
370
|
+
const _APE = "AuthorizationPendingException";
|
|
371
|
+
const _AT = "AccessToken";
|
|
372
|
+
const _CS = "ClientSecret";
|
|
373
|
+
const _CT = "CreateToken";
|
|
374
|
+
const _CTR = "CreateTokenRequest";
|
|
375
|
+
const _CTRr = "CreateTokenResponse";
|
|
376
|
+
const _CV = "CodeVerifier";
|
|
377
|
+
const _ETE = "ExpiredTokenException";
|
|
378
|
+
const _ICE = "InvalidClientException";
|
|
379
|
+
const _IGE = "InvalidGrantException";
|
|
380
|
+
const _IRE = "InvalidRequestException";
|
|
381
|
+
const _ISE = "InternalServerException";
|
|
382
|
+
const _ISEn = "InvalidScopeException";
|
|
383
|
+
const _IT = "IdToken";
|
|
384
|
+
const _RT = "RefreshToken";
|
|
385
|
+
const _SDE = "SlowDownException";
|
|
386
|
+
const _UCE = "UnauthorizedClientException";
|
|
387
|
+
const _UGTE = "UnsupportedGrantTypeException";
|
|
388
|
+
const _aT = "accessToken";
|
|
389
|
+
const _c = "client";
|
|
390
|
+
const _cI = "clientId";
|
|
391
|
+
const _cS = "clientSecret";
|
|
392
|
+
const _cV = "codeVerifier";
|
|
393
|
+
const _co = "code";
|
|
394
|
+
const _dC = "deviceCode";
|
|
395
|
+
const _e = "error";
|
|
396
|
+
const _eI = "expiresIn";
|
|
397
|
+
const _ed = "error_description";
|
|
398
|
+
const _gT = "grantType";
|
|
399
|
+
const _h = "http";
|
|
400
|
+
const _hE = "httpError";
|
|
401
|
+
const _iT = "idToken";
|
|
402
|
+
const _r = "reason";
|
|
403
|
+
const _rT = "refreshToken";
|
|
404
|
+
const _rU = "redirectUri";
|
|
405
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.ssooidc";
|
|
406
|
+
const _sc = "scope";
|
|
407
|
+
const _se = "server";
|
|
408
|
+
const _tT = "tokenType";
|
|
409
|
+
const n0 = "com.amazonaws.ssooidc";
|
|
410
|
+
const _s_registry = schema.TypeRegistry.for(_s);
|
|
411
|
+
var SSOOIDCServiceException$ = [-3, _s, "SSOOIDCServiceException", 0, [], []];
|
|
412
|
+
_s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);
|
|
413
|
+
const n0_registry = schema.TypeRegistry.for(n0);
|
|
414
|
+
var AccessDeniedException$ = [
|
|
415
|
+
-3,
|
|
416
|
+
n0,
|
|
417
|
+
_ADE,
|
|
418
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
419
|
+
[_e, _r, _ed],
|
|
420
|
+
[0, 0, 0],
|
|
421
|
+
];
|
|
422
|
+
n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
|
|
423
|
+
var AuthorizationPendingException$ = [
|
|
424
|
+
-3,
|
|
425
|
+
n0,
|
|
426
|
+
_APE,
|
|
427
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
428
|
+
[_e, _ed],
|
|
429
|
+
[0, 0],
|
|
430
|
+
];
|
|
431
|
+
n0_registry.registerError(AuthorizationPendingException$, AuthorizationPendingException);
|
|
432
|
+
var ExpiredTokenException$ = [-3, n0, _ETE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
|
433
|
+
n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
|
|
434
|
+
var InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _ed], [0, 0]];
|
|
435
|
+
n0_registry.registerError(InternalServerException$, InternalServerException);
|
|
436
|
+
var InvalidClientException$ = [-3, n0, _ICE, { [_e]: _c, [_hE]: 401 }, [_e, _ed], [0, 0]];
|
|
437
|
+
n0_registry.registerError(InvalidClientException$, InvalidClientException);
|
|
438
|
+
var InvalidGrantException$ = [-3, n0, _IGE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
|
439
|
+
n0_registry.registerError(InvalidGrantException$, InvalidGrantException);
|
|
440
|
+
var InvalidRequestException$ = [
|
|
441
|
+
-3,
|
|
442
|
+
n0,
|
|
443
|
+
_IRE,
|
|
444
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
445
|
+
[_e, _r, _ed],
|
|
446
|
+
[0, 0, 0],
|
|
447
|
+
];
|
|
448
|
+
n0_registry.registerError(InvalidRequestException$, InvalidRequestException);
|
|
449
|
+
var InvalidScopeException$ = [-3, n0, _ISEn, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
|
450
|
+
n0_registry.registerError(InvalidScopeException$, InvalidScopeException);
|
|
451
|
+
var SlowDownException$ = [-3, n0, _SDE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
|
452
|
+
n0_registry.registerError(SlowDownException$, SlowDownException);
|
|
453
|
+
var UnauthorizedClientException$ = [
|
|
454
|
+
-3,
|
|
455
|
+
n0,
|
|
456
|
+
_UCE,
|
|
457
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
458
|
+
[_e, _ed],
|
|
459
|
+
[0, 0],
|
|
460
|
+
];
|
|
461
|
+
n0_registry.registerError(UnauthorizedClientException$, UnauthorizedClientException);
|
|
462
|
+
var UnsupportedGrantTypeException$ = [
|
|
463
|
+
-3,
|
|
464
|
+
n0,
|
|
465
|
+
_UGTE,
|
|
466
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
467
|
+
[_e, _ed],
|
|
468
|
+
[0, 0],
|
|
469
|
+
];
|
|
470
|
+
n0_registry.registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException);
|
|
471
|
+
const errorTypeRegistries = [_s_registry, n0_registry];
|
|
472
|
+
var AccessToken = [0, n0, _AT, 8, 0];
|
|
473
|
+
var ClientSecret = [0, n0, _CS, 8, 0];
|
|
474
|
+
var CodeVerifier = [0, n0, _CV, 8, 0];
|
|
475
|
+
var IdToken = [0, n0, _IT, 8, 0];
|
|
476
|
+
var RefreshToken = [0, n0, _RT, 8, 0];
|
|
477
|
+
var CreateTokenRequest$ = [
|
|
478
|
+
3,
|
|
479
|
+
n0,
|
|
480
|
+
_CTR,
|
|
481
|
+
0,
|
|
482
|
+
[_cI, _cS, _gT, _dC, _co, _rT, _sc, _rU, _cV],
|
|
483
|
+
[0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]],
|
|
484
|
+
3,
|
|
485
|
+
];
|
|
486
|
+
var CreateTokenResponse$ = [
|
|
487
|
+
3,
|
|
488
|
+
n0,
|
|
489
|
+
_CTRr,
|
|
490
|
+
0,
|
|
491
|
+
[_aT, _tT, _eI, _rT, _iT],
|
|
492
|
+
[[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]],
|
|
493
|
+
];
|
|
494
|
+
var CreateToken$ = [
|
|
495
|
+
9,
|
|
496
|
+
n0,
|
|
497
|
+
_CT,
|
|
498
|
+
{ [_h]: ["POST", "/token", 200] },
|
|
499
|
+
() => CreateTokenRequest$,
|
|
500
|
+
() => CreateTokenResponse$,
|
|
501
|
+
];
|
|
502
|
+
|
|
503
|
+
const getRuntimeConfig$1 = (config) => {
|
|
504
|
+
return {
|
|
505
|
+
apiVersion: "2019-06-10",
|
|
506
|
+
base64Decoder: config?.base64Decoder ?? serde.fromBase64,
|
|
507
|
+
base64Encoder: config?.base64Encoder ?? serde.toBase64,
|
|
508
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
509
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
510
|
+
extensions: config?.extensions ?? [],
|
|
511
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,
|
|
512
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
513
|
+
{
|
|
514
|
+
schemeId: "aws.auth#sigv4",
|
|
515
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
516
|
+
signer: new httpAuthSchemes.AwsSdkSigV4Signer(),
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
schemeId: "smithy.api#noAuth",
|
|
520
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
521
|
+
signer: new core.NoAuthSigner(),
|
|
522
|
+
},
|
|
523
|
+
],
|
|
524
|
+
logger: config?.logger ?? new client.NoOpLogger(),
|
|
525
|
+
protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,
|
|
526
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
527
|
+
defaultNamespace: "com.amazonaws.ssooidc",
|
|
528
|
+
errorTypeRegistries,
|
|
529
|
+
version: "2019-06-10",
|
|
530
|
+
serviceTarget: "AWSSSOOIDCService",
|
|
531
|
+
},
|
|
532
|
+
serviceId: config?.serviceId ?? "SSO OIDC",
|
|
533
|
+
urlParser: config?.urlParser ?? protocols.parseUrl,
|
|
534
|
+
utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,
|
|
535
|
+
utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
const getRuntimeConfig = (config$1) => {
|
|
540
|
+
client.emitWarningIfUnsupportedVersion(process.version);
|
|
541
|
+
const defaultsMode = config.resolveDefaultsModeConfig(config$1);
|
|
542
|
+
const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);
|
|
543
|
+
const clientSharedValues = getRuntimeConfig$1(config$1);
|
|
544
|
+
client$1.emitWarningIfUnsupportedVersion(process.version);
|
|
545
|
+
const loaderConfig = {
|
|
546
|
+
profile: config$1?.profile,
|
|
547
|
+
logger: clientSharedValues.logger,
|
|
548
|
+
};
|
|
549
|
+
return {
|
|
550
|
+
...clientSharedValues,
|
|
551
|
+
...config$1,
|
|
552
|
+
runtime: "node",
|
|
553
|
+
defaultsMode,
|
|
554
|
+
authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
555
|
+
bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,
|
|
556
|
+
defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??
|
|
557
|
+
client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
558
|
+
maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),
|
|
559
|
+
region: config$1?.region ??
|
|
560
|
+
config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
561
|
+
requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),
|
|
562
|
+
retryMode: config$1?.retryMode ??
|
|
563
|
+
config.loadConfig({
|
|
564
|
+
...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
565
|
+
default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,
|
|
566
|
+
}, config$1),
|
|
567
|
+
sha256: config$1?.sha256 ?? serde.Hash.bind(null, "sha256"),
|
|
568
|
+
streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,
|
|
569
|
+
useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
570
|
+
useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
571
|
+
userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
576
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
577
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
578
|
+
let _credentials = runtimeConfig.credentials;
|
|
579
|
+
return {
|
|
580
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
581
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
582
|
+
if (index === -1) {
|
|
583
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
584
|
+
}
|
|
585
|
+
else {
|
|
586
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
httpAuthSchemes() {
|
|
590
|
+
return _httpAuthSchemes;
|
|
591
|
+
},
|
|
592
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
593
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
594
|
+
},
|
|
595
|
+
httpAuthSchemeProvider() {
|
|
596
|
+
return _httpAuthSchemeProvider;
|
|
597
|
+
},
|
|
598
|
+
setCredentials(credentials) {
|
|
599
|
+
_credentials = credentials;
|
|
600
|
+
},
|
|
601
|
+
credentials() {
|
|
602
|
+
return _credentials;
|
|
603
|
+
},
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
607
|
+
return {
|
|
608
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
609
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
610
|
+
credentials: config.credentials(),
|
|
611
|
+
};
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
615
|
+
const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
616
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
617
|
+
return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
class SSOOIDCClient extends client.Client {
|
|
621
|
+
config;
|
|
622
|
+
constructor(...[configuration]) {
|
|
623
|
+
const _config_0 = getRuntimeConfig(configuration || {});
|
|
624
|
+
super(_config_0);
|
|
625
|
+
this.initConfig = _config_0;
|
|
626
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
627
|
+
const _config_2 = client$1.resolveUserAgentConfig(_config_1);
|
|
628
|
+
const _config_3 = retry.resolveRetryConfig(_config_2);
|
|
629
|
+
const _config_4 = config.resolveRegionConfig(_config_3);
|
|
630
|
+
const _config_5 = client$1.resolveHostHeaderConfig(_config_4);
|
|
631
|
+
const _config_6 = endpoints.resolveEndpointConfig(_config_5);
|
|
632
|
+
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
633
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
634
|
+
this.config = _config_8;
|
|
635
|
+
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
636
|
+
this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));
|
|
637
|
+
this.middlewareStack.use(retry.getRetryPlugin(this.config));
|
|
638
|
+
this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));
|
|
639
|
+
this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));
|
|
640
|
+
this.middlewareStack.use(client$1.getLoggerPlugin(this.config));
|
|
641
|
+
this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));
|
|
642
|
+
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
643
|
+
httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,
|
|
644
|
+
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
645
|
+
"aws.auth#sigv4": config.credentials,
|
|
646
|
+
}),
|
|
647
|
+
}));
|
|
648
|
+
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
649
|
+
}
|
|
650
|
+
destroy() {
|
|
651
|
+
super.destroy();
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
class CreateTokenCommand extends client.Command
|
|
656
|
+
.classBuilder()
|
|
657
|
+
.ep(commonParams)
|
|
658
|
+
.m(function (Command, cs, config, o) {
|
|
659
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
660
|
+
})
|
|
661
|
+
.s("AWSSSOOIDCService", "CreateToken", {})
|
|
662
|
+
.n("SSOOIDCClient", "CreateTokenCommand")
|
|
663
|
+
.sc(CreateToken$)
|
|
664
|
+
.build() {
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
const commands = {
|
|
668
|
+
CreateTokenCommand,
|
|
669
|
+
};
|
|
670
|
+
class SSOOIDC extends SSOOIDCClient {
|
|
671
|
+
}
|
|
672
|
+
client.createAggregatedClient(commands, SSOOIDC);
|
|
673
|
+
|
|
674
|
+
const AccessDeniedExceptionReason = {
|
|
675
|
+
KMS_ACCESS_DENIED: "KMS_AccessDeniedException",
|
|
676
|
+
};
|
|
677
|
+
const InvalidRequestExceptionReason = {
|
|
678
|
+
KMS_DISABLED_KEY: "KMS_DisabledException",
|
|
679
|
+
KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException",
|
|
680
|
+
KMS_INVALID_STATE: "KMS_InvalidStateException",
|
|
681
|
+
KMS_KEY_NOT_FOUND: "KMS_NotFoundException",
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
__webpack_unused_export__ = client.Command;
|
|
685
|
+
__webpack_unused_export__ = client.Client;
|
|
686
|
+
__webpack_unused_export__ = AccessDeniedException;
|
|
687
|
+
__webpack_unused_export__ = AccessDeniedException$;
|
|
688
|
+
__webpack_unused_export__ = AccessDeniedExceptionReason;
|
|
689
|
+
__webpack_unused_export__ = AuthorizationPendingException;
|
|
690
|
+
__webpack_unused_export__ = AuthorizationPendingException$;
|
|
691
|
+
__webpack_unused_export__ = CreateToken$;
|
|
692
|
+
exports.CreateTokenCommand = CreateTokenCommand;
|
|
693
|
+
__webpack_unused_export__ = CreateTokenRequest$;
|
|
694
|
+
__webpack_unused_export__ = CreateTokenResponse$;
|
|
695
|
+
__webpack_unused_export__ = ExpiredTokenException;
|
|
696
|
+
__webpack_unused_export__ = ExpiredTokenException$;
|
|
697
|
+
__webpack_unused_export__ = InternalServerException;
|
|
698
|
+
__webpack_unused_export__ = InternalServerException$;
|
|
699
|
+
__webpack_unused_export__ = InvalidClientException;
|
|
700
|
+
__webpack_unused_export__ = InvalidClientException$;
|
|
701
|
+
__webpack_unused_export__ = InvalidGrantException;
|
|
702
|
+
__webpack_unused_export__ = InvalidGrantException$;
|
|
703
|
+
__webpack_unused_export__ = InvalidRequestException;
|
|
704
|
+
__webpack_unused_export__ = InvalidRequestException$;
|
|
705
|
+
__webpack_unused_export__ = InvalidRequestExceptionReason;
|
|
706
|
+
__webpack_unused_export__ = InvalidScopeException;
|
|
707
|
+
__webpack_unused_export__ = InvalidScopeException$;
|
|
708
|
+
__webpack_unused_export__ = SSOOIDC;
|
|
709
|
+
exports.SSOOIDCClient = SSOOIDCClient;
|
|
710
|
+
__webpack_unused_export__ = SSOOIDCServiceException;
|
|
711
|
+
__webpack_unused_export__ = SSOOIDCServiceException$;
|
|
712
|
+
__webpack_unused_export__ = SlowDownException;
|
|
713
|
+
__webpack_unused_export__ = SlowDownException$;
|
|
714
|
+
__webpack_unused_export__ = UnauthorizedClientException;
|
|
715
|
+
__webpack_unused_export__ = UnauthorizedClientException$;
|
|
716
|
+
__webpack_unused_export__ = UnsupportedGrantTypeException;
|
|
717
|
+
__webpack_unused_export__ = UnsupportedGrantTypeException$;
|
|
718
|
+
__webpack_unused_export__ = errorTypeRegistries;
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
/***/ })
|
|
722
|
+
|
|
723
|
+
};
|
|
724
|
+
;
|