@cdk8s/awscdk-resolver 0.0.14 → 0.0.16
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/.jsii +4 -4
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/models_0.js +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/models_0.js +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeChangeSetCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/models_0.d.ts +135 -134
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/models_0.d.ts +135 -134
- package/node_modules/@aws-sdk/client-cloudformation/package.json +11 -11
- package/node_modules/@aws-sdk/client-sso/package.json +9 -9
- package/node_modules/@aws-sdk/client-sts/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/middleware-host-header/dist-es/index.js +1 -1
- package/node_modules/@aws-sdk/middleware-host-header/package.json +1 -1
- package/node_modules/@aws-sdk/region-config-resolver/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/dist-cjs/bundle/client-sso-oidc-browser.js +320 -183
- package/node_modules/@aws-sdk/token-providers/dist-cjs/bundle/client-sso-oidc-node.js +321 -184
- package/node_modules/@aws-sdk/token-providers/dist-es/bundle/client-sso-oidc-browser.js +231 -93
- package/node_modules/@aws-sdk/token-providers/dist-es/bundle/client-sso-oidc-node.js +237 -98
- package/node_modules/@aws-sdk/token-providers/dist-types/bundle/client-sso-oidc-browser.d.ts +1 -1
- package/node_modules/@aws-sdk/token-providers/dist-types/bundle/client-sso-oidc-node.d.ts +1 -1
- package/node_modules/@aws-sdk/token-providers/package.json +8 -8
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +2 -2
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/middleware-endpoint/package.json +3 -3
- package/node_modules/@smithy/middleware-retry/package.json +2 -2
- package/node_modules/@smithy/node-config-provider/package.json +2 -2
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseIni.js +11 -8
- package/node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js +11 -8
- package/node_modules/@smithy/shared-ini-file-loader/package.json +1 -1
- package/node_modules/@smithy/util-defaults-mode-node/package.json +4 -4
- package/package.json +7 -7
@@ -12,10 +12,10 @@ var resolveClientEndpointParameters = (options) => {
|
|
12
12
|
...options,
|
13
13
|
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
14
14
|
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
15
|
-
defaultSigningName: "awsssooidc"
|
15
|
+
defaultSigningName: "awsssooidc",
|
16
16
|
};
|
17
17
|
};
|
18
|
-
var package_default = { version: "3.
|
18
|
+
var package_default = { version: "3.429.0" };
|
19
19
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
20
20
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
21
21
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
|
@@ -28,31 +28,133 @@ import { parseUrl } from "@smithy/url-parser";
|
|
28
28
|
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
29
29
|
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
30
30
|
import { resolveEndpoint } from "@aws-sdk/util-endpoints";
|
31
|
-
var
|
32
|
-
var
|
33
|
-
var
|
34
|
-
var
|
35
|
-
var a = "
|
31
|
+
var s = "required";
|
32
|
+
var t = "fn";
|
33
|
+
var u = "argv";
|
34
|
+
var v = "ref";
|
35
|
+
var a = "isSet";
|
36
36
|
var b = "tree";
|
37
37
|
var c = "error";
|
38
38
|
var d = "endpoint";
|
39
|
-
var e =
|
40
|
-
var f =
|
41
|
-
var g = { [s]: "
|
42
|
-
var h = { [
|
43
|
-
var i = { [
|
44
|
-
var j = {};
|
45
|
-
var k = { [
|
46
|
-
var l = {
|
47
|
-
var m = [
|
48
|
-
var n = [
|
49
|
-
var o = [
|
50
|
-
var
|
39
|
+
var e = "PartitionResult";
|
40
|
+
var f = "getAttr";
|
41
|
+
var g = { [s]: false, type: "String" };
|
42
|
+
var h = { [s]: true, default: false, type: "Boolean" };
|
43
|
+
var i = { [v]: "Endpoint" };
|
44
|
+
var j = { [t]: "booleanEquals", [u]: [{ [v]: "UseFIPS" }, true] };
|
45
|
+
var k = { [t]: "booleanEquals", [u]: [{ [v]: "UseDualStack" }, true] };
|
46
|
+
var l = {};
|
47
|
+
var m = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [{ [v]: e }, "supportsFIPS"] }] };
|
48
|
+
var n = { [v]: e };
|
49
|
+
var o = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [n, "supportsDualStack"] }] };
|
50
|
+
var p = [j];
|
51
|
+
var q = [k];
|
52
|
+
var r = [{ [v]: "Region" }];
|
53
|
+
var _data = {
|
54
|
+
version: "1.0",
|
55
|
+
parameters: { Region: g, UseDualStack: h, UseFIPS: h, Endpoint: g },
|
56
|
+
rules: [
|
57
|
+
{
|
58
|
+
conditions: [{ [t]: a, [u]: [i] }],
|
59
|
+
type: b,
|
60
|
+
rules: [
|
61
|
+
{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c },
|
62
|
+
{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c },
|
63
|
+
{ endpoint: { url: i, properties: l, headers: l }, type: d },
|
64
|
+
],
|
65
|
+
},
|
66
|
+
{
|
67
|
+
conditions: [{ [t]: a, [u]: r }],
|
68
|
+
type: b,
|
69
|
+
rules: [
|
70
|
+
{
|
71
|
+
conditions: [{ [t]: "aws.partition", [u]: r, assign: e }],
|
72
|
+
type: b,
|
73
|
+
rules: [
|
74
|
+
{
|
75
|
+
conditions: [j, k],
|
76
|
+
type: b,
|
77
|
+
rules: [
|
78
|
+
{
|
79
|
+
conditions: [m, o],
|
80
|
+
type: b,
|
81
|
+
rules: [
|
82
|
+
{
|
83
|
+
endpoint: {
|
84
|
+
url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
|
85
|
+
properties: l,
|
86
|
+
headers: l,
|
87
|
+
},
|
88
|
+
type: d,
|
89
|
+
},
|
90
|
+
],
|
91
|
+
},
|
92
|
+
{ error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c },
|
93
|
+
],
|
94
|
+
},
|
95
|
+
{
|
96
|
+
conditions: p,
|
97
|
+
type: b,
|
98
|
+
rules: [
|
99
|
+
{
|
100
|
+
conditions: [m],
|
101
|
+
type: b,
|
102
|
+
rules: [
|
103
|
+
{
|
104
|
+
conditions: [{ [t]: "stringEquals", [u]: ["aws-us-gov", { [t]: f, [u]: [n, "name"] }] }],
|
105
|
+
endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: l, headers: l },
|
106
|
+
type: d,
|
107
|
+
},
|
108
|
+
{
|
109
|
+
endpoint: {
|
110
|
+
url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",
|
111
|
+
properties: l,
|
112
|
+
headers: l,
|
113
|
+
},
|
114
|
+
type: d,
|
115
|
+
},
|
116
|
+
],
|
117
|
+
},
|
118
|
+
{ error: "FIPS is enabled but this partition does not support FIPS", type: c },
|
119
|
+
],
|
120
|
+
},
|
121
|
+
{
|
122
|
+
conditions: q,
|
123
|
+
type: b,
|
124
|
+
rules: [
|
125
|
+
{
|
126
|
+
conditions: [o],
|
127
|
+
type: b,
|
128
|
+
rules: [
|
129
|
+
{
|
130
|
+
endpoint: {
|
131
|
+
url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",
|
132
|
+
properties: l,
|
133
|
+
headers: l,
|
134
|
+
},
|
135
|
+
type: d,
|
136
|
+
},
|
137
|
+
],
|
138
|
+
},
|
139
|
+
{ error: "DualStack is enabled but this partition does not support DualStack", type: c },
|
140
|
+
],
|
141
|
+
},
|
142
|
+
{
|
143
|
+
endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l },
|
144
|
+
type: d,
|
145
|
+
},
|
146
|
+
],
|
147
|
+
},
|
148
|
+
],
|
149
|
+
},
|
150
|
+
{ error: "Invalid Configuration: Missing Region", type: c },
|
151
|
+
],
|
152
|
+
};
|
51
153
|
var ruleSet = _data;
|
52
154
|
var defaultEndpointResolver = (endpointParams, context = {}) => {
|
53
155
|
return resolveEndpoint(ruleSet, {
|
54
156
|
endpointParams,
|
55
|
-
logger: context.logger
|
157
|
+
logger: context.logger,
|
56
158
|
});
|
57
159
|
};
|
58
160
|
var getRuntimeConfig = (config) => ({
|
@@ -61,11 +163,12 @@ var getRuntimeConfig = (config) => ({
|
|
61
163
|
base64Encoder: config?.base64Encoder ?? toBase64,
|
62
164
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
63
165
|
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
166
|
+
extensions: config?.extensions ?? [],
|
64
167
|
logger: config?.logger ?? new NoOpLogger(),
|
65
168
|
serviceId: config?.serviceId ?? "SSO OIDC",
|
66
169
|
urlParser: config?.urlParser ?? parseUrl,
|
67
170
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
68
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8
|
171
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
69
172
|
});
|
70
173
|
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
71
174
|
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
@@ -79,7 +182,8 @@ var getRuntimeConfig2 = (config) => {
|
|
79
182
|
runtime: "browser",
|
80
183
|
defaultsMode,
|
81
184
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
82
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
185
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
186
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }),
|
83
187
|
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
84
188
|
region: config?.region ?? invalidProvider("Region is missing"),
|
85
189
|
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
@@ -87,7 +191,25 @@ var getRuntimeConfig2 = (config) => {
|
|
87
191
|
sha256: config?.sha256 ?? Sha256,
|
88
192
|
streamCollector: config?.streamCollector ?? streamCollector,
|
89
193
|
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
90
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT))
|
194
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
195
|
+
};
|
196
|
+
};
|
197
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
198
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
199
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
200
|
+
var asPartial = (t2) => t2;
|
201
|
+
var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
202
|
+
const extensionConfiguration = {
|
203
|
+
...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
|
204
|
+
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
205
|
+
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
206
|
+
};
|
207
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
208
|
+
return {
|
209
|
+
...runtimeConfig,
|
210
|
+
...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
|
211
|
+
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
212
|
+
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
91
213
|
};
|
92
214
|
};
|
93
215
|
var SSOOIDCClient = class extends __Client {
|
@@ -99,8 +221,9 @@ var SSOOIDCClient = class extends __Client {
|
|
99
221
|
const _config_4 = resolveRetryConfig(_config_3);
|
100
222
|
const _config_5 = resolveHostHeaderConfig(_config_4);
|
101
223
|
const _config_6 = resolveUserAgentConfig(_config_5);
|
102
|
-
|
103
|
-
|
224
|
+
const _config_7 = resolveRuntimeExtensions(_config_6, configuration?.extensions || []);
|
225
|
+
super(_config_7);
|
226
|
+
this.config = _config_7;
|
104
227
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
105
228
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
106
229
|
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
@@ -116,9 +239,10 @@ import { createAggregatedClient } from "@smithy/smithy-client";
|
|
116
239
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
117
240
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
118
241
|
import { Command as $Command } from "@smithy/smithy-client";
|
242
|
+
import { SMITHY_CONTEXT_KEY } from "@smithy/types";
|
119
243
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
120
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException } from "@smithy/smithy-client";
|
121
|
-
import { ServiceException as __ServiceException } from "@smithy/smithy-client";
|
244
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
|
245
|
+
import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
|
122
246
|
var SSOOIDCServiceException = class _SSOOIDCServiceException extends __ServiceException {
|
123
247
|
constructor(options) {
|
124
248
|
super(options);
|
@@ -130,7 +254,7 @@ var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceE
|
|
130
254
|
super({
|
131
255
|
name: "AccessDeniedException",
|
132
256
|
$fault: "client",
|
133
|
-
...opts
|
257
|
+
...opts,
|
134
258
|
});
|
135
259
|
this.name = "AccessDeniedException";
|
136
260
|
this.$fault = "client";
|
@@ -144,7 +268,7 @@ var AuthorizationPendingException = class _AuthorizationPendingException extends
|
|
144
268
|
super({
|
145
269
|
name: "AuthorizationPendingException",
|
146
270
|
$fault: "client",
|
147
|
-
...opts
|
271
|
+
...opts,
|
148
272
|
});
|
149
273
|
this.name = "AuthorizationPendingException";
|
150
274
|
this.$fault = "client";
|
@@ -158,7 +282,7 @@ var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceE
|
|
158
282
|
super({
|
159
283
|
name: "ExpiredTokenException",
|
160
284
|
$fault: "client",
|
161
|
-
...opts
|
285
|
+
...opts,
|
162
286
|
});
|
163
287
|
this.name = "ExpiredTokenException";
|
164
288
|
this.$fault = "client";
|
@@ -172,7 +296,7 @@ var InternalServerException = class _InternalServerException extends SSOOIDCServ
|
|
172
296
|
super({
|
173
297
|
name: "InternalServerException",
|
174
298
|
$fault: "server",
|
175
|
-
...opts
|
299
|
+
...opts,
|
176
300
|
});
|
177
301
|
this.name = "InternalServerException";
|
178
302
|
this.$fault = "server";
|
@@ -186,7 +310,7 @@ var InvalidClientException = class _InvalidClientException extends SSOOIDCServic
|
|
186
310
|
super({
|
187
311
|
name: "InvalidClientException",
|
188
312
|
$fault: "client",
|
189
|
-
...opts
|
313
|
+
...opts,
|
190
314
|
});
|
191
315
|
this.name = "InvalidClientException";
|
192
316
|
this.$fault = "client";
|
@@ -200,7 +324,7 @@ var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceE
|
|
200
324
|
super({
|
201
325
|
name: "InvalidGrantException",
|
202
326
|
$fault: "client",
|
203
|
-
...opts
|
327
|
+
...opts,
|
204
328
|
});
|
205
329
|
this.name = "InvalidGrantException";
|
206
330
|
this.$fault = "client";
|
@@ -214,7 +338,7 @@ var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServ
|
|
214
338
|
super({
|
215
339
|
name: "InvalidRequestException",
|
216
340
|
$fault: "client",
|
217
|
-
...opts
|
341
|
+
...opts,
|
218
342
|
});
|
219
343
|
this.name = "InvalidRequestException";
|
220
344
|
this.$fault = "client";
|
@@ -228,7 +352,7 @@ var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceE
|
|
228
352
|
super({
|
229
353
|
name: "InvalidScopeException",
|
230
354
|
$fault: "client",
|
231
|
-
...opts
|
355
|
+
...opts,
|
232
356
|
});
|
233
357
|
this.name = "InvalidScopeException";
|
234
358
|
this.$fault = "client";
|
@@ -242,7 +366,7 @@ var SlowDownException = class _SlowDownException extends SSOOIDCServiceException
|
|
242
366
|
super({
|
243
367
|
name: "SlowDownException",
|
244
368
|
$fault: "client",
|
245
|
-
...opts
|
369
|
+
...opts,
|
246
370
|
});
|
247
371
|
this.name = "SlowDownException";
|
248
372
|
this.$fault = "client";
|
@@ -256,7 +380,7 @@ var UnauthorizedClientException = class _UnauthorizedClientException extends SSO
|
|
256
380
|
super({
|
257
381
|
name: "UnauthorizedClientException",
|
258
382
|
$fault: "client",
|
259
|
-
...opts
|
383
|
+
...opts,
|
260
384
|
});
|
261
385
|
this.name = "UnauthorizedClientException";
|
262
386
|
this.$fault = "client";
|
@@ -270,7 +394,7 @@ var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends
|
|
270
394
|
super({
|
271
395
|
name: "UnsupportedGrantTypeException",
|
272
396
|
$fault: "client",
|
273
|
-
...opts
|
397
|
+
...opts,
|
274
398
|
});
|
275
399
|
this.name = "UnsupportedGrantTypeException";
|
276
400
|
this.$fault = "client";
|
@@ -284,7 +408,7 @@ var InvalidClientMetadataException = class _InvalidClientMetadataException exten
|
|
284
408
|
super({
|
285
409
|
name: "InvalidClientMetadataException",
|
286
410
|
$fault: "client",
|
287
|
-
...opts
|
411
|
+
...opts,
|
288
412
|
});
|
289
413
|
this.name = "InvalidClientMetadataException";
|
290
414
|
this.$fault = "client";
|
@@ -296,7 +420,7 @@ var InvalidClientMetadataException = class _InvalidClientMetadataException exten
|
|
296
420
|
var se_CreateTokenCommand = async (input, context) => {
|
297
421
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
298
422
|
const headers = {
|
299
|
-
"content-type": "application/json"
|
423
|
+
"content-type": "application/json",
|
300
424
|
};
|
301
425
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/token`;
|
302
426
|
let body;
|
@@ -308,7 +432,7 @@ var se_CreateTokenCommand = async (input, context) => {
|
|
308
432
|
grantType: [],
|
309
433
|
redirectUri: [],
|
310
434
|
refreshToken: [],
|
311
|
-
scope: (_) => _json(_)
|
435
|
+
scope: (_) => _json(_),
|
312
436
|
}));
|
313
437
|
return new __HttpRequest({
|
314
438
|
protocol,
|
@@ -317,20 +441,20 @@ var se_CreateTokenCommand = async (input, context) => {
|
|
317
441
|
method: "POST",
|
318
442
|
headers,
|
319
443
|
path: resolvedPath,
|
320
|
-
body
|
444
|
+
body,
|
321
445
|
});
|
322
446
|
};
|
323
447
|
var se_RegisterClientCommand = async (input, context) => {
|
324
448
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
325
449
|
const headers = {
|
326
|
-
"content-type": "application/json"
|
450
|
+
"content-type": "application/json",
|
327
451
|
};
|
328
452
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/client/register`;
|
329
453
|
let body;
|
330
454
|
body = JSON.stringify(take(input, {
|
331
455
|
clientName: [],
|
332
456
|
clientType: [],
|
333
|
-
scopes: (_) => _json(_)
|
457
|
+
scopes: (_) => _json(_),
|
334
458
|
}));
|
335
459
|
return new __HttpRequest({
|
336
460
|
protocol,
|
@@ -339,20 +463,20 @@ var se_RegisterClientCommand = async (input, context) => {
|
|
339
463
|
method: "POST",
|
340
464
|
headers,
|
341
465
|
path: resolvedPath,
|
342
|
-
body
|
466
|
+
body,
|
343
467
|
});
|
344
468
|
};
|
345
469
|
var se_StartDeviceAuthorizationCommand = async (input, context) => {
|
346
470
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
347
471
|
const headers = {
|
348
|
-
"content-type": "application/json"
|
472
|
+
"content-type": "application/json",
|
349
473
|
};
|
350
474
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/device_authorization`;
|
351
475
|
let body;
|
352
476
|
body = JSON.stringify(take(input, {
|
353
477
|
clientId: [],
|
354
478
|
clientSecret: [],
|
355
|
-
startUrl: []
|
479
|
+
startUrl: [],
|
356
480
|
}));
|
357
481
|
return new __HttpRequest({
|
358
482
|
protocol,
|
@@ -361,7 +485,7 @@ var se_StartDeviceAuthorizationCommand = async (input, context) => {
|
|
361
485
|
method: "POST",
|
362
486
|
headers,
|
363
487
|
path: resolvedPath,
|
364
|
-
body
|
488
|
+
body,
|
365
489
|
});
|
366
490
|
};
|
367
491
|
var de_CreateTokenCommand = async (output, context) => {
|
@@ -369,7 +493,7 @@ var de_CreateTokenCommand = async (output, context) => {
|
|
369
493
|
return de_CreateTokenCommandError(output, context);
|
370
494
|
}
|
371
495
|
const contents = map({
|
372
|
-
$metadata: deserializeMetadata(output)
|
496
|
+
$metadata: deserializeMetadata(output),
|
373
497
|
});
|
374
498
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
375
499
|
const doc = take(data, {
|
@@ -377,7 +501,7 @@ var de_CreateTokenCommand = async (output, context) => {
|
|
377
501
|
expiresIn: __expectInt32,
|
378
502
|
idToken: __expectString,
|
379
503
|
refreshToken: __expectString,
|
380
|
-
tokenType: __expectString
|
504
|
+
tokenType: __expectString,
|
381
505
|
});
|
382
506
|
Object.assign(contents, doc);
|
383
507
|
return contents;
|
@@ -385,7 +509,7 @@ var de_CreateTokenCommand = async (output, context) => {
|
|
385
509
|
var de_CreateTokenCommandError = async (output, context) => {
|
386
510
|
const parsedOutput = {
|
387
511
|
...output,
|
388
|
-
body: await parseErrorBody(output.body, context)
|
512
|
+
body: await parseErrorBody(output.body, context),
|
389
513
|
};
|
390
514
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
391
515
|
switch (errorCode) {
|
@@ -427,7 +551,7 @@ var de_CreateTokenCommandError = async (output, context) => {
|
|
427
551
|
return throwDefaultError({
|
428
552
|
output,
|
429
553
|
parsedBody,
|
430
|
-
errorCode
|
554
|
+
errorCode,
|
431
555
|
});
|
432
556
|
}
|
433
557
|
};
|
@@ -436,7 +560,7 @@ var de_RegisterClientCommand = async (output, context) => {
|
|
436
560
|
return de_RegisterClientCommandError(output, context);
|
437
561
|
}
|
438
562
|
const contents = map({
|
439
|
-
$metadata: deserializeMetadata(output)
|
563
|
+
$metadata: deserializeMetadata(output),
|
440
564
|
});
|
441
565
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
442
566
|
const doc = take(data, {
|
@@ -445,7 +569,7 @@ var de_RegisterClientCommand = async (output, context) => {
|
|
445
569
|
clientIdIssuedAt: __expectLong,
|
446
570
|
clientSecret: __expectString,
|
447
571
|
clientSecretExpiresAt: __expectLong,
|
448
|
-
tokenEndpoint: __expectString
|
572
|
+
tokenEndpoint: __expectString,
|
449
573
|
});
|
450
574
|
Object.assign(contents, doc);
|
451
575
|
return contents;
|
@@ -453,7 +577,7 @@ var de_RegisterClientCommand = async (output, context) => {
|
|
453
577
|
var de_RegisterClientCommandError = async (output, context) => {
|
454
578
|
const parsedOutput = {
|
455
579
|
...output,
|
456
|
-
body: await parseErrorBody(output.body, context)
|
580
|
+
body: await parseErrorBody(output.body, context),
|
457
581
|
};
|
458
582
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
459
583
|
switch (errorCode) {
|
@@ -474,7 +598,7 @@ var de_RegisterClientCommandError = async (output, context) => {
|
|
474
598
|
return throwDefaultError({
|
475
599
|
output,
|
476
600
|
parsedBody,
|
477
|
-
errorCode
|
601
|
+
errorCode,
|
478
602
|
});
|
479
603
|
}
|
480
604
|
};
|
@@ -483,7 +607,7 @@ var de_StartDeviceAuthorizationCommand = async (output, context) => {
|
|
483
607
|
return de_StartDeviceAuthorizationCommandError(output, context);
|
484
608
|
}
|
485
609
|
const contents = map({
|
486
|
-
$metadata: deserializeMetadata(output)
|
610
|
+
$metadata: deserializeMetadata(output),
|
487
611
|
});
|
488
612
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
489
613
|
const doc = take(data, {
|
@@ -492,7 +616,7 @@ var de_StartDeviceAuthorizationCommand = async (output, context) => {
|
|
492
616
|
interval: __expectInt32,
|
493
617
|
userCode: __expectString,
|
494
618
|
verificationUri: __expectString,
|
495
|
-
verificationUriComplete: __expectString
|
619
|
+
verificationUriComplete: __expectString,
|
496
620
|
});
|
497
621
|
Object.assign(contents, doc);
|
498
622
|
return contents;
|
@@ -500,7 +624,7 @@ var de_StartDeviceAuthorizationCommand = async (output, context) => {
|
|
500
624
|
var de_StartDeviceAuthorizationCommandError = async (output, context) => {
|
501
625
|
const parsedOutput = {
|
502
626
|
...output,
|
503
|
-
body: await parseErrorBody(output.body, context)
|
627
|
+
body: await parseErrorBody(output.body, context),
|
504
628
|
};
|
505
629
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
506
630
|
switch (errorCode) {
|
@@ -524,7 +648,7 @@ var de_StartDeviceAuthorizationCommandError = async (output, context) => {
|
|
524
648
|
return throwDefaultError({
|
525
649
|
output,
|
526
650
|
parsedBody,
|
527
|
-
errorCode
|
651
|
+
errorCode,
|
528
652
|
});
|
529
653
|
}
|
530
654
|
};
|
@@ -534,12 +658,12 @@ var de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
534
658
|
const data = parsedOutput.body;
|
535
659
|
const doc = take(data, {
|
536
660
|
error: __expectString,
|
537
|
-
error_description: __expectString
|
661
|
+
error_description: __expectString,
|
538
662
|
});
|
539
663
|
Object.assign(contents, doc);
|
540
664
|
const exception = new AccessDeniedException({
|
541
665
|
$metadata: deserializeMetadata(parsedOutput),
|
542
|
-
...contents
|
666
|
+
...contents,
|
543
667
|
});
|
544
668
|
return __decorateServiceException(exception, parsedOutput.body);
|
545
669
|
};
|
@@ -548,12 +672,12 @@ var de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
|
|
548
672
|
const data = parsedOutput.body;
|
549
673
|
const doc = take(data, {
|
550
674
|
error: __expectString,
|
551
|
-
error_description: __expectString
|
675
|
+
error_description: __expectString,
|
552
676
|
});
|
553
677
|
Object.assign(contents, doc);
|
554
678
|
const exception = new AuthorizationPendingException({
|
555
679
|
$metadata: deserializeMetadata(parsedOutput),
|
556
|
-
...contents
|
680
|
+
...contents,
|
557
681
|
});
|
558
682
|
return __decorateServiceException(exception, parsedOutput.body);
|
559
683
|
};
|
@@ -562,12 +686,12 @@ var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
|
|
562
686
|
const data = parsedOutput.body;
|
563
687
|
const doc = take(data, {
|
564
688
|
error: __expectString,
|
565
|
-
error_description: __expectString
|
689
|
+
error_description: __expectString,
|
566
690
|
});
|
567
691
|
Object.assign(contents, doc);
|
568
692
|
const exception = new ExpiredTokenException({
|
569
693
|
$metadata: deserializeMetadata(parsedOutput),
|
570
|
-
...contents
|
694
|
+
...contents,
|
571
695
|
});
|
572
696
|
return __decorateServiceException(exception, parsedOutput.body);
|
573
697
|
};
|
@@ -576,12 +700,12 @@ var de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
576
700
|
const data = parsedOutput.body;
|
577
701
|
const doc = take(data, {
|
578
702
|
error: __expectString,
|
579
|
-
error_description: __expectString
|
703
|
+
error_description: __expectString,
|
580
704
|
});
|
581
705
|
Object.assign(contents, doc);
|
582
706
|
const exception = new InternalServerException({
|
583
707
|
$metadata: deserializeMetadata(parsedOutput),
|
584
|
-
...contents
|
708
|
+
...contents,
|
585
709
|
});
|
586
710
|
return __decorateServiceException(exception, parsedOutput.body);
|
587
711
|
};
|
@@ -590,12 +714,12 @@ var de_InvalidClientExceptionRes = async (parsedOutput, context) => {
|
|
590
714
|
const data = parsedOutput.body;
|
591
715
|
const doc = take(data, {
|
592
716
|
error: __expectString,
|
593
|
-
error_description: __expectString
|
717
|
+
error_description: __expectString,
|
594
718
|
});
|
595
719
|
Object.assign(contents, doc);
|
596
720
|
const exception = new InvalidClientException({
|
597
721
|
$metadata: deserializeMetadata(parsedOutput),
|
598
|
-
...contents
|
722
|
+
...contents,
|
599
723
|
});
|
600
724
|
return __decorateServiceException(exception, parsedOutput.body);
|
601
725
|
};
|
@@ -604,12 +728,12 @@ var de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => {
|
|
604
728
|
const data = parsedOutput.body;
|
605
729
|
const doc = take(data, {
|
606
730
|
error: __expectString,
|
607
|
-
error_description: __expectString
|
731
|
+
error_description: __expectString,
|
608
732
|
});
|
609
733
|
Object.assign(contents, doc);
|
610
734
|
const exception = new InvalidClientMetadataException({
|
611
735
|
$metadata: deserializeMetadata(parsedOutput),
|
612
|
-
...contents
|
736
|
+
...contents,
|
613
737
|
});
|
614
738
|
return __decorateServiceException(exception, parsedOutput.body);
|
615
739
|
};
|
@@ -618,12 +742,12 @@ var de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
|
|
618
742
|
const data = parsedOutput.body;
|
619
743
|
const doc = take(data, {
|
620
744
|
error: __expectString,
|
621
|
-
error_description: __expectString
|
745
|
+
error_description: __expectString,
|
622
746
|
});
|
623
747
|
Object.assign(contents, doc);
|
624
748
|
const exception = new InvalidGrantException({
|
625
749
|
$metadata: deserializeMetadata(parsedOutput),
|
626
|
-
...contents
|
750
|
+
...contents,
|
627
751
|
});
|
628
752
|
return __decorateServiceException(exception, parsedOutput.body);
|
629
753
|
};
|
@@ -632,12 +756,12 @@ var de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
632
756
|
const data = parsedOutput.body;
|
633
757
|
const doc = take(data, {
|
634
758
|
error: __expectString,
|
635
|
-
error_description: __expectString
|
759
|
+
error_description: __expectString,
|
636
760
|
});
|
637
761
|
Object.assign(contents, doc);
|
638
762
|
const exception = new InvalidRequestException({
|
639
763
|
$metadata: deserializeMetadata(parsedOutput),
|
640
|
-
...contents
|
764
|
+
...contents,
|
641
765
|
});
|
642
766
|
return __decorateServiceException(exception, parsedOutput.body);
|
643
767
|
};
|
@@ -646,12 +770,12 @@ var de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
|
|
646
770
|
const data = parsedOutput.body;
|
647
771
|
const doc = take(data, {
|
648
772
|
error: __expectString,
|
649
|
-
error_description: __expectString
|
773
|
+
error_description: __expectString,
|
650
774
|
});
|
651
775
|
Object.assign(contents, doc);
|
652
776
|
const exception = new InvalidScopeException({
|
653
777
|
$metadata: deserializeMetadata(parsedOutput),
|
654
|
-
...contents
|
778
|
+
...contents,
|
655
779
|
});
|
656
780
|
return __decorateServiceException(exception, parsedOutput.body);
|
657
781
|
};
|
@@ -660,12 +784,12 @@ var de_SlowDownExceptionRes = async (parsedOutput, context) => {
|
|
660
784
|
const data = parsedOutput.body;
|
661
785
|
const doc = take(data, {
|
662
786
|
error: __expectString,
|
663
|
-
error_description: __expectString
|
787
|
+
error_description: __expectString,
|
664
788
|
});
|
665
789
|
Object.assign(contents, doc);
|
666
790
|
const exception = new SlowDownException({
|
667
791
|
$metadata: deserializeMetadata(parsedOutput),
|
668
|
-
...contents
|
792
|
+
...contents,
|
669
793
|
});
|
670
794
|
return __decorateServiceException(exception, parsedOutput.body);
|
671
795
|
};
|
@@ -674,12 +798,12 @@ var de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
|
|
674
798
|
const data = parsedOutput.body;
|
675
799
|
const doc = take(data, {
|
676
800
|
error: __expectString,
|
677
|
-
error_description: __expectString
|
801
|
+
error_description: __expectString,
|
678
802
|
});
|
679
803
|
Object.assign(contents, doc);
|
680
804
|
const exception = new UnauthorizedClientException({
|
681
805
|
$metadata: deserializeMetadata(parsedOutput),
|
682
|
-
...contents
|
806
|
+
...contents,
|
683
807
|
});
|
684
808
|
return __decorateServiceException(exception, parsedOutput.body);
|
685
809
|
};
|
@@ -688,12 +812,12 @@ var de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => {
|
|
688
812
|
const data = parsedOutput.body;
|
689
813
|
const doc = take(data, {
|
690
814
|
error: __expectString,
|
691
|
-
error_description: __expectString
|
815
|
+
error_description: __expectString,
|
692
816
|
});
|
693
817
|
Object.assign(contents, doc);
|
694
818
|
const exception = new UnsupportedGrantTypeException({
|
695
819
|
$metadata: deserializeMetadata(parsedOutput),
|
696
|
-
...contents
|
820
|
+
...contents,
|
697
821
|
});
|
698
822
|
return __decorateServiceException(exception, parsedOutput.body);
|
699
823
|
};
|
@@ -701,7 +825,7 @@ var deserializeMetadata = (output) => ({
|
|
701
825
|
httpStatusCode: output.statusCode,
|
702
826
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
703
827
|
extendedRequestId: output.headers["x-amz-id-2"],
|
704
|
-
cfId: output.headers["x-amz-cf-id"]
|
828
|
+
cfId: output.headers["x-amz-cf-id"],
|
705
829
|
});
|
706
830
|
var collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
707
831
|
var parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
@@ -754,7 +878,7 @@ var CreateTokenCommand = class _CreateTokenCommand extends $Command {
|
|
754
878
|
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
755
879
|
Endpoint: { type: "builtInParams", name: "endpoint" },
|
756
880
|
Region: { type: "builtInParams", name: "region" },
|
757
|
-
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
881
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
758
882
|
};
|
759
883
|
}
|
760
884
|
resolveMiddleware(clientStack, configuration, options) {
|
@@ -769,7 +893,11 @@ var CreateTokenCommand = class _CreateTokenCommand extends $Command {
|
|
769
893
|
clientName,
|
770
894
|
commandName,
|
771
895
|
inputFilterSensitiveLog: (_) => _,
|
772
|
-
outputFilterSensitiveLog: (_) => _
|
896
|
+
outputFilterSensitiveLog: (_) => _,
|
897
|
+
[SMITHY_CONTEXT_KEY]: {
|
898
|
+
service: "AWSSSOOIDCService",
|
899
|
+
operation: "CreateToken",
|
900
|
+
},
|
773
901
|
};
|
774
902
|
const { requestHandler } = configuration;
|
775
903
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
@@ -784,6 +912,7 @@ var CreateTokenCommand = class _CreateTokenCommand extends $Command {
|
|
784
912
|
import { getEndpointPlugin as getEndpointPlugin2 } from "@smithy/middleware-endpoint";
|
785
913
|
import { getSerdePlugin as getSerdePlugin2 } from "@smithy/middleware-serde";
|
786
914
|
import { Command as $Command2 } from "@smithy/smithy-client";
|
915
|
+
import { SMITHY_CONTEXT_KEY as SMITHY_CONTEXT_KEY2 } from "@smithy/types";
|
787
916
|
var RegisterClientCommand = class _RegisterClientCommand extends $Command2 {
|
788
917
|
constructor(input) {
|
789
918
|
super();
|
@@ -794,7 +923,7 @@ var RegisterClientCommand = class _RegisterClientCommand extends $Command2 {
|
|
794
923
|
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
795
924
|
Endpoint: { type: "builtInParams", name: "endpoint" },
|
796
925
|
Region: { type: "builtInParams", name: "region" },
|
797
|
-
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
926
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
798
927
|
};
|
799
928
|
}
|
800
929
|
resolveMiddleware(clientStack, configuration, options) {
|
@@ -809,7 +938,11 @@ var RegisterClientCommand = class _RegisterClientCommand extends $Command2 {
|
|
809
938
|
clientName,
|
810
939
|
commandName,
|
811
940
|
inputFilterSensitiveLog: (_) => _,
|
812
|
-
outputFilterSensitiveLog: (_) => _
|
941
|
+
outputFilterSensitiveLog: (_) => _,
|
942
|
+
[SMITHY_CONTEXT_KEY2]: {
|
943
|
+
service: "AWSSSOOIDCService",
|
944
|
+
operation: "RegisterClient",
|
945
|
+
},
|
813
946
|
};
|
814
947
|
const { requestHandler } = configuration;
|
815
948
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
@@ -824,6 +957,7 @@ var RegisterClientCommand = class _RegisterClientCommand extends $Command2 {
|
|
824
957
|
import { getEndpointPlugin as getEndpointPlugin3 } from "@smithy/middleware-endpoint";
|
825
958
|
import { getSerdePlugin as getSerdePlugin3 } from "@smithy/middleware-serde";
|
826
959
|
import { Command as $Command3 } from "@smithy/smithy-client";
|
960
|
+
import { SMITHY_CONTEXT_KEY as SMITHY_CONTEXT_KEY3 } from "@smithy/types";
|
827
961
|
var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends $Command3 {
|
828
962
|
constructor(input) {
|
829
963
|
super();
|
@@ -834,7 +968,7 @@ var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand ext
|
|
834
968
|
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
835
969
|
Endpoint: { type: "builtInParams", name: "endpoint" },
|
836
970
|
Region: { type: "builtInParams", name: "region" },
|
837
|
-
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
971
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
838
972
|
};
|
839
973
|
}
|
840
974
|
resolveMiddleware(clientStack, configuration, options) {
|
@@ -849,7 +983,11 @@ var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand ext
|
|
849
983
|
clientName,
|
850
984
|
commandName,
|
851
985
|
inputFilterSensitiveLog: (_) => _,
|
852
|
-
outputFilterSensitiveLog: (_) => _
|
986
|
+
outputFilterSensitiveLog: (_) => _,
|
987
|
+
[SMITHY_CONTEXT_KEY3]: {
|
988
|
+
service: "AWSSSOOIDCService",
|
989
|
+
operation: "StartDeviceAuthorization",
|
990
|
+
},
|
853
991
|
};
|
854
992
|
const { requestHandler } = configuration;
|
855
993
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
@@ -864,9 +1002,9 @@ var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand ext
|
|
864
1002
|
var commands = {
|
865
1003
|
CreateTokenCommand,
|
866
1004
|
RegisterClientCommand,
|
867
|
-
StartDeviceAuthorizationCommand
|
1005
|
+
StartDeviceAuthorizationCommand,
|
868
1006
|
};
|
869
1007
|
var SSOOIDC = class extends SSOOIDCClient {
|
870
1008
|
};
|
871
1009
|
createAggregatedClient(commands, SSOOIDC);
|
872
|
-
export { AccessDeniedException, AuthorizationPendingException, CreateTokenCommand, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidRequestException, InvalidScopeException, SSOOIDCClient, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException };
|
1010
|
+
export { AccessDeniedException, AuthorizationPendingException, CreateTokenCommand, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidRequestException, InvalidScopeException, SSOOIDCClient, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException, };
|