@aws-sdk/client-sts 3.310.0 → 3.315.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,9 +7,7 @@ const fast_xml_parser_1 = require("fast-xml-parser");
|
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const STSServiceException_1 = require("../models/STSServiceException");
|
|
9
9
|
const se_AssumeRoleCommand = async (input, context) => {
|
|
10
|
-
const headers =
|
|
11
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
12
|
-
};
|
|
10
|
+
const headers = SHARED_HEADERS;
|
|
13
11
|
let body;
|
|
14
12
|
body = buildFormUrlencodedString({
|
|
15
13
|
...se_AssumeRoleRequest(input, context),
|
|
@@ -20,9 +18,7 @@ const se_AssumeRoleCommand = async (input, context) => {
|
|
|
20
18
|
};
|
|
21
19
|
exports.se_AssumeRoleCommand = se_AssumeRoleCommand;
|
|
22
20
|
const se_AssumeRoleWithSAMLCommand = async (input, context) => {
|
|
23
|
-
const headers =
|
|
24
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
25
|
-
};
|
|
21
|
+
const headers = SHARED_HEADERS;
|
|
26
22
|
let body;
|
|
27
23
|
body = buildFormUrlencodedString({
|
|
28
24
|
...se_AssumeRoleWithSAMLRequest(input, context),
|
|
@@ -33,9 +29,7 @@ const se_AssumeRoleWithSAMLCommand = async (input, context) => {
|
|
|
33
29
|
};
|
|
34
30
|
exports.se_AssumeRoleWithSAMLCommand = se_AssumeRoleWithSAMLCommand;
|
|
35
31
|
const se_AssumeRoleWithWebIdentityCommand = async (input, context) => {
|
|
36
|
-
const headers =
|
|
37
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
38
|
-
};
|
|
32
|
+
const headers = SHARED_HEADERS;
|
|
39
33
|
let body;
|
|
40
34
|
body = buildFormUrlencodedString({
|
|
41
35
|
...se_AssumeRoleWithWebIdentityRequest(input, context),
|
|
@@ -46,9 +40,7 @@ const se_AssumeRoleWithWebIdentityCommand = async (input, context) => {
|
|
|
46
40
|
};
|
|
47
41
|
exports.se_AssumeRoleWithWebIdentityCommand = se_AssumeRoleWithWebIdentityCommand;
|
|
48
42
|
const se_DecodeAuthorizationMessageCommand = async (input, context) => {
|
|
49
|
-
const headers =
|
|
50
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
51
|
-
};
|
|
43
|
+
const headers = SHARED_HEADERS;
|
|
52
44
|
let body;
|
|
53
45
|
body = buildFormUrlencodedString({
|
|
54
46
|
...se_DecodeAuthorizationMessageRequest(input, context),
|
|
@@ -59,9 +51,7 @@ const se_DecodeAuthorizationMessageCommand = async (input, context) => {
|
|
|
59
51
|
};
|
|
60
52
|
exports.se_DecodeAuthorizationMessageCommand = se_DecodeAuthorizationMessageCommand;
|
|
61
53
|
const se_GetAccessKeyInfoCommand = async (input, context) => {
|
|
62
|
-
const headers =
|
|
63
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
64
|
-
};
|
|
54
|
+
const headers = SHARED_HEADERS;
|
|
65
55
|
let body;
|
|
66
56
|
body = buildFormUrlencodedString({
|
|
67
57
|
...se_GetAccessKeyInfoRequest(input, context),
|
|
@@ -72,9 +62,7 @@ const se_GetAccessKeyInfoCommand = async (input, context) => {
|
|
|
72
62
|
};
|
|
73
63
|
exports.se_GetAccessKeyInfoCommand = se_GetAccessKeyInfoCommand;
|
|
74
64
|
const se_GetCallerIdentityCommand = async (input, context) => {
|
|
75
|
-
const headers =
|
|
76
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
77
|
-
};
|
|
65
|
+
const headers = SHARED_HEADERS;
|
|
78
66
|
let body;
|
|
79
67
|
body = buildFormUrlencodedString({
|
|
80
68
|
...se_GetCallerIdentityRequest(input, context),
|
|
@@ -85,9 +73,7 @@ const se_GetCallerIdentityCommand = async (input, context) => {
|
|
|
85
73
|
};
|
|
86
74
|
exports.se_GetCallerIdentityCommand = se_GetCallerIdentityCommand;
|
|
87
75
|
const se_GetFederationTokenCommand = async (input, context) => {
|
|
88
|
-
const headers =
|
|
89
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
90
|
-
};
|
|
76
|
+
const headers = SHARED_HEADERS;
|
|
91
77
|
let body;
|
|
92
78
|
body = buildFormUrlencodedString({
|
|
93
79
|
...se_GetFederationTokenRequest(input, context),
|
|
@@ -98,9 +84,7 @@ const se_GetFederationTokenCommand = async (input, context) => {
|
|
|
98
84
|
};
|
|
99
85
|
exports.se_GetFederationTokenCommand = se_GetFederationTokenCommand;
|
|
100
86
|
const se_GetSessionTokenCommand = async (input, context) => {
|
|
101
|
-
const headers =
|
|
102
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
103
|
-
};
|
|
87
|
+
const headers = SHARED_HEADERS;
|
|
104
88
|
let body;
|
|
105
89
|
body = buildFormUrlencodedString({
|
|
106
90
|
...se_GetSessionTokenRequest(input, context),
|
|
@@ -121,7 +105,7 @@ const de_AssumeRoleCommand = async (output, context) => {
|
|
|
121
105
|
$metadata: deserializeMetadata(output),
|
|
122
106
|
...contents,
|
|
123
107
|
};
|
|
124
|
-
return
|
|
108
|
+
return response;
|
|
125
109
|
};
|
|
126
110
|
exports.de_AssumeRoleCommand = de_AssumeRoleCommand;
|
|
127
111
|
const de_AssumeRoleCommandError = async (output, context) => {
|
|
@@ -145,10 +129,9 @@ const de_AssumeRoleCommandError = async (output, context) => {
|
|
|
145
129
|
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
146
130
|
default:
|
|
147
131
|
const parsedBody = parsedOutput.body;
|
|
148
|
-
|
|
132
|
+
return throwDefaultError({
|
|
149
133
|
output,
|
|
150
134
|
parsedBody: parsedBody.Error,
|
|
151
|
-
exceptionCtor: STSServiceException_1.STSServiceException,
|
|
152
135
|
errorCode,
|
|
153
136
|
});
|
|
154
137
|
}
|
|
@@ -164,7 +147,7 @@ const de_AssumeRoleWithSAMLCommand = async (output, context) => {
|
|
|
164
147
|
$metadata: deserializeMetadata(output),
|
|
165
148
|
...contents,
|
|
166
149
|
};
|
|
167
|
-
return
|
|
150
|
+
return response;
|
|
168
151
|
};
|
|
169
152
|
exports.de_AssumeRoleWithSAMLCommand = de_AssumeRoleWithSAMLCommand;
|
|
170
153
|
const de_AssumeRoleWithSAMLCommandError = async (output, context) => {
|
|
@@ -194,10 +177,9 @@ const de_AssumeRoleWithSAMLCommandError = async (output, context) => {
|
|
|
194
177
|
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
195
178
|
default:
|
|
196
179
|
const parsedBody = parsedOutput.body;
|
|
197
|
-
|
|
180
|
+
return throwDefaultError({
|
|
198
181
|
output,
|
|
199
182
|
parsedBody: parsedBody.Error,
|
|
200
|
-
exceptionCtor: STSServiceException_1.STSServiceException,
|
|
201
183
|
errorCode,
|
|
202
184
|
});
|
|
203
185
|
}
|
|
@@ -213,7 +195,7 @@ const de_AssumeRoleWithWebIdentityCommand = async (output, context) => {
|
|
|
213
195
|
$metadata: deserializeMetadata(output),
|
|
214
196
|
...contents,
|
|
215
197
|
};
|
|
216
|
-
return
|
|
198
|
+
return response;
|
|
217
199
|
};
|
|
218
200
|
exports.de_AssumeRoleWithWebIdentityCommand = de_AssumeRoleWithWebIdentityCommand;
|
|
219
201
|
const de_AssumeRoleWithWebIdentityCommandError = async (output, context) => {
|
|
@@ -246,10 +228,9 @@ const de_AssumeRoleWithWebIdentityCommandError = async (output, context) => {
|
|
|
246
228
|
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
247
229
|
default:
|
|
248
230
|
const parsedBody = parsedOutput.body;
|
|
249
|
-
|
|
231
|
+
return throwDefaultError({
|
|
250
232
|
output,
|
|
251
233
|
parsedBody: parsedBody.Error,
|
|
252
|
-
exceptionCtor: STSServiceException_1.STSServiceException,
|
|
253
234
|
errorCode,
|
|
254
235
|
});
|
|
255
236
|
}
|
|
@@ -265,7 +246,7 @@ const de_DecodeAuthorizationMessageCommand = async (output, context) => {
|
|
|
265
246
|
$metadata: deserializeMetadata(output),
|
|
266
247
|
...contents,
|
|
267
248
|
};
|
|
268
|
-
return
|
|
249
|
+
return response;
|
|
269
250
|
};
|
|
270
251
|
exports.de_DecodeAuthorizationMessageCommand = de_DecodeAuthorizationMessageCommand;
|
|
271
252
|
const de_DecodeAuthorizationMessageCommandError = async (output, context) => {
|
|
@@ -280,10 +261,9 @@ const de_DecodeAuthorizationMessageCommandError = async (output, context) => {
|
|
|
280
261
|
throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context);
|
|
281
262
|
default:
|
|
282
263
|
const parsedBody = parsedOutput.body;
|
|
283
|
-
|
|
264
|
+
return throwDefaultError({
|
|
284
265
|
output,
|
|
285
266
|
parsedBody: parsedBody.Error,
|
|
286
|
-
exceptionCtor: STSServiceException_1.STSServiceException,
|
|
287
267
|
errorCode,
|
|
288
268
|
});
|
|
289
269
|
}
|
|
@@ -299,7 +279,7 @@ const de_GetAccessKeyInfoCommand = async (output, context) => {
|
|
|
299
279
|
$metadata: deserializeMetadata(output),
|
|
300
280
|
...contents,
|
|
301
281
|
};
|
|
302
|
-
return
|
|
282
|
+
return response;
|
|
303
283
|
};
|
|
304
284
|
exports.de_GetAccessKeyInfoCommand = de_GetAccessKeyInfoCommand;
|
|
305
285
|
const de_GetAccessKeyInfoCommandError = async (output, context) => {
|
|
@@ -309,10 +289,9 @@ const de_GetAccessKeyInfoCommandError = async (output, context) => {
|
|
|
309
289
|
};
|
|
310
290
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
311
291
|
const parsedBody = parsedOutput.body;
|
|
312
|
-
|
|
292
|
+
return throwDefaultError({
|
|
313
293
|
output,
|
|
314
294
|
parsedBody: parsedBody.Error,
|
|
315
|
-
exceptionCtor: STSServiceException_1.STSServiceException,
|
|
316
295
|
errorCode,
|
|
317
296
|
});
|
|
318
297
|
};
|
|
@@ -327,7 +306,7 @@ const de_GetCallerIdentityCommand = async (output, context) => {
|
|
|
327
306
|
$metadata: deserializeMetadata(output),
|
|
328
307
|
...contents,
|
|
329
308
|
};
|
|
330
|
-
return
|
|
309
|
+
return response;
|
|
331
310
|
};
|
|
332
311
|
exports.de_GetCallerIdentityCommand = de_GetCallerIdentityCommand;
|
|
333
312
|
const de_GetCallerIdentityCommandError = async (output, context) => {
|
|
@@ -337,10 +316,9 @@ const de_GetCallerIdentityCommandError = async (output, context) => {
|
|
|
337
316
|
};
|
|
338
317
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
339
318
|
const parsedBody = parsedOutput.body;
|
|
340
|
-
|
|
319
|
+
return throwDefaultError({
|
|
341
320
|
output,
|
|
342
321
|
parsedBody: parsedBody.Error,
|
|
343
|
-
exceptionCtor: STSServiceException_1.STSServiceException,
|
|
344
322
|
errorCode,
|
|
345
323
|
});
|
|
346
324
|
};
|
|
@@ -355,7 +333,7 @@ const de_GetFederationTokenCommand = async (output, context) => {
|
|
|
355
333
|
$metadata: deserializeMetadata(output),
|
|
356
334
|
...contents,
|
|
357
335
|
};
|
|
358
|
-
return
|
|
336
|
+
return response;
|
|
359
337
|
};
|
|
360
338
|
exports.de_GetFederationTokenCommand = de_GetFederationTokenCommand;
|
|
361
339
|
const de_GetFederationTokenCommandError = async (output, context) => {
|
|
@@ -376,10 +354,9 @@ const de_GetFederationTokenCommandError = async (output, context) => {
|
|
|
376
354
|
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
377
355
|
default:
|
|
378
356
|
const parsedBody = parsedOutput.body;
|
|
379
|
-
|
|
357
|
+
return throwDefaultError({
|
|
380
358
|
output,
|
|
381
359
|
parsedBody: parsedBody.Error,
|
|
382
|
-
exceptionCtor: STSServiceException_1.STSServiceException,
|
|
383
360
|
errorCode,
|
|
384
361
|
});
|
|
385
362
|
}
|
|
@@ -395,7 +372,7 @@ const de_GetSessionTokenCommand = async (output, context) => {
|
|
|
395
372
|
$metadata: deserializeMetadata(output),
|
|
396
373
|
...contents,
|
|
397
374
|
};
|
|
398
|
-
return
|
|
375
|
+
return response;
|
|
399
376
|
};
|
|
400
377
|
exports.de_GetSessionTokenCommand = de_GetSessionTokenCommand;
|
|
401
378
|
const de_GetSessionTokenCommandError = async (output, context) => {
|
|
@@ -410,10 +387,9 @@ const de_GetSessionTokenCommandError = async (output, context) => {
|
|
|
410
387
|
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
411
388
|
default:
|
|
412
389
|
const parsedBody = parsedOutput.body;
|
|
413
|
-
|
|
390
|
+
return throwDefaultError({
|
|
414
391
|
output,
|
|
415
392
|
parsedBody: parsedBody.Error,
|
|
416
|
-
exceptionCtor: STSServiceException_1.STSServiceException,
|
|
417
393
|
errorCode,
|
|
418
394
|
});
|
|
419
395
|
}
|
|
@@ -956,6 +932,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
956
932
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
957
933
|
};
|
|
958
934
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
935
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(STSServiceException_1.STSServiceException);
|
|
959
936
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
960
937
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
961
938
|
const contents = {
|
|
@@ -974,6 +951,9 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
974
951
|
}
|
|
975
952
|
return new protocol_http_1.HttpRequest(contents);
|
|
976
953
|
};
|
|
954
|
+
const SHARED_HEADERS = {
|
|
955
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
956
|
+
};
|
|
977
957
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
978
958
|
if (encoded.length) {
|
|
979
959
|
const parser = new fast_xml_parser_1.XMLParser({
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getValueFromTextNode as __getValueFromTextNode, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32,
|
|
2
|
+
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getValueFromTextNode as __getValueFromTextNode, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { XMLParser } from "fast-xml-parser";
|
|
4
4
|
import { ExpiredTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidAuthorizationMessageException, InvalidIdentityTokenException, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, } from "../models/models_0";
|
|
5
5
|
import { STSServiceException as __BaseException } from "../models/STSServiceException";
|
|
6
6
|
export const se_AssumeRoleCommand = async (input, context) => {
|
|
7
|
-
const headers =
|
|
8
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
9
|
-
};
|
|
7
|
+
const headers = SHARED_HEADERS;
|
|
10
8
|
let body;
|
|
11
9
|
body = buildFormUrlencodedString({
|
|
12
10
|
...se_AssumeRoleRequest(input, context),
|
|
@@ -16,9 +14,7 @@ export const se_AssumeRoleCommand = async (input, context) => {
|
|
|
16
14
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
17
15
|
};
|
|
18
16
|
export const se_AssumeRoleWithSAMLCommand = async (input, context) => {
|
|
19
|
-
const headers =
|
|
20
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
21
|
-
};
|
|
17
|
+
const headers = SHARED_HEADERS;
|
|
22
18
|
let body;
|
|
23
19
|
body = buildFormUrlencodedString({
|
|
24
20
|
...se_AssumeRoleWithSAMLRequest(input, context),
|
|
@@ -28,9 +24,7 @@ export const se_AssumeRoleWithSAMLCommand = async (input, context) => {
|
|
|
28
24
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
25
|
};
|
|
30
26
|
export const se_AssumeRoleWithWebIdentityCommand = async (input, context) => {
|
|
31
|
-
const headers =
|
|
32
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
33
|
-
};
|
|
27
|
+
const headers = SHARED_HEADERS;
|
|
34
28
|
let body;
|
|
35
29
|
body = buildFormUrlencodedString({
|
|
36
30
|
...se_AssumeRoleWithWebIdentityRequest(input, context),
|
|
@@ -40,9 +34,7 @@ export const se_AssumeRoleWithWebIdentityCommand = async (input, context) => {
|
|
|
40
34
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
35
|
};
|
|
42
36
|
export const se_DecodeAuthorizationMessageCommand = async (input, context) => {
|
|
43
|
-
const headers =
|
|
44
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
45
|
-
};
|
|
37
|
+
const headers = SHARED_HEADERS;
|
|
46
38
|
let body;
|
|
47
39
|
body = buildFormUrlencodedString({
|
|
48
40
|
...se_DecodeAuthorizationMessageRequest(input, context),
|
|
@@ -52,9 +44,7 @@ export const se_DecodeAuthorizationMessageCommand = async (input, context) => {
|
|
|
52
44
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
53
45
|
};
|
|
54
46
|
export const se_GetAccessKeyInfoCommand = async (input, context) => {
|
|
55
|
-
const headers =
|
|
56
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
57
|
-
};
|
|
47
|
+
const headers = SHARED_HEADERS;
|
|
58
48
|
let body;
|
|
59
49
|
body = buildFormUrlencodedString({
|
|
60
50
|
...se_GetAccessKeyInfoRequest(input, context),
|
|
@@ -64,9 +54,7 @@ export const se_GetAccessKeyInfoCommand = async (input, context) => {
|
|
|
64
54
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
65
55
|
};
|
|
66
56
|
export const se_GetCallerIdentityCommand = async (input, context) => {
|
|
67
|
-
const headers =
|
|
68
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
69
|
-
};
|
|
57
|
+
const headers = SHARED_HEADERS;
|
|
70
58
|
let body;
|
|
71
59
|
body = buildFormUrlencodedString({
|
|
72
60
|
...se_GetCallerIdentityRequest(input, context),
|
|
@@ -76,9 +64,7 @@ export const se_GetCallerIdentityCommand = async (input, context) => {
|
|
|
76
64
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
65
|
};
|
|
78
66
|
export const se_GetFederationTokenCommand = async (input, context) => {
|
|
79
|
-
const headers =
|
|
80
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
81
|
-
};
|
|
67
|
+
const headers = SHARED_HEADERS;
|
|
82
68
|
let body;
|
|
83
69
|
body = buildFormUrlencodedString({
|
|
84
70
|
...se_GetFederationTokenRequest(input, context),
|
|
@@ -88,9 +74,7 @@ export const se_GetFederationTokenCommand = async (input, context) => {
|
|
|
88
74
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
89
75
|
};
|
|
90
76
|
export const se_GetSessionTokenCommand = async (input, context) => {
|
|
91
|
-
const headers =
|
|
92
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
93
|
-
};
|
|
77
|
+
const headers = SHARED_HEADERS;
|
|
94
78
|
let body;
|
|
95
79
|
body = buildFormUrlencodedString({
|
|
96
80
|
...se_GetSessionTokenRequest(input, context),
|
|
@@ -110,7 +94,7 @@ export const de_AssumeRoleCommand = async (output, context) => {
|
|
|
110
94
|
$metadata: deserializeMetadata(output),
|
|
111
95
|
...contents,
|
|
112
96
|
};
|
|
113
|
-
return
|
|
97
|
+
return response;
|
|
114
98
|
};
|
|
115
99
|
const de_AssumeRoleCommandError = async (output, context) => {
|
|
116
100
|
const parsedOutput = {
|
|
@@ -133,10 +117,9 @@ const de_AssumeRoleCommandError = async (output, context) => {
|
|
|
133
117
|
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
134
118
|
default:
|
|
135
119
|
const parsedBody = parsedOutput.body;
|
|
136
|
-
throwDefaultError({
|
|
120
|
+
return throwDefaultError({
|
|
137
121
|
output,
|
|
138
122
|
parsedBody: parsedBody.Error,
|
|
139
|
-
exceptionCtor: __BaseException,
|
|
140
123
|
errorCode,
|
|
141
124
|
});
|
|
142
125
|
}
|
|
@@ -152,7 +135,7 @@ export const de_AssumeRoleWithSAMLCommand = async (output, context) => {
|
|
|
152
135
|
$metadata: deserializeMetadata(output),
|
|
153
136
|
...contents,
|
|
154
137
|
};
|
|
155
|
-
return
|
|
138
|
+
return response;
|
|
156
139
|
};
|
|
157
140
|
const de_AssumeRoleWithSAMLCommandError = async (output, context) => {
|
|
158
141
|
const parsedOutput = {
|
|
@@ -181,10 +164,9 @@ const de_AssumeRoleWithSAMLCommandError = async (output, context) => {
|
|
|
181
164
|
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
182
165
|
default:
|
|
183
166
|
const parsedBody = parsedOutput.body;
|
|
184
|
-
throwDefaultError({
|
|
167
|
+
return throwDefaultError({
|
|
185
168
|
output,
|
|
186
169
|
parsedBody: parsedBody.Error,
|
|
187
|
-
exceptionCtor: __BaseException,
|
|
188
170
|
errorCode,
|
|
189
171
|
});
|
|
190
172
|
}
|
|
@@ -200,7 +182,7 @@ export const de_AssumeRoleWithWebIdentityCommand = async (output, context) => {
|
|
|
200
182
|
$metadata: deserializeMetadata(output),
|
|
201
183
|
...contents,
|
|
202
184
|
};
|
|
203
|
-
return
|
|
185
|
+
return response;
|
|
204
186
|
};
|
|
205
187
|
const de_AssumeRoleWithWebIdentityCommandError = async (output, context) => {
|
|
206
188
|
const parsedOutput = {
|
|
@@ -232,10 +214,9 @@ const de_AssumeRoleWithWebIdentityCommandError = async (output, context) => {
|
|
|
232
214
|
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
233
215
|
default:
|
|
234
216
|
const parsedBody = parsedOutput.body;
|
|
235
|
-
throwDefaultError({
|
|
217
|
+
return throwDefaultError({
|
|
236
218
|
output,
|
|
237
219
|
parsedBody: parsedBody.Error,
|
|
238
|
-
exceptionCtor: __BaseException,
|
|
239
220
|
errorCode,
|
|
240
221
|
});
|
|
241
222
|
}
|
|
@@ -251,7 +232,7 @@ export const de_DecodeAuthorizationMessageCommand = async (output, context) => {
|
|
|
251
232
|
$metadata: deserializeMetadata(output),
|
|
252
233
|
...contents,
|
|
253
234
|
};
|
|
254
|
-
return
|
|
235
|
+
return response;
|
|
255
236
|
};
|
|
256
237
|
const de_DecodeAuthorizationMessageCommandError = async (output, context) => {
|
|
257
238
|
const parsedOutput = {
|
|
@@ -265,10 +246,9 @@ const de_DecodeAuthorizationMessageCommandError = async (output, context) => {
|
|
|
265
246
|
throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context);
|
|
266
247
|
default:
|
|
267
248
|
const parsedBody = parsedOutput.body;
|
|
268
|
-
throwDefaultError({
|
|
249
|
+
return throwDefaultError({
|
|
269
250
|
output,
|
|
270
251
|
parsedBody: parsedBody.Error,
|
|
271
|
-
exceptionCtor: __BaseException,
|
|
272
252
|
errorCode,
|
|
273
253
|
});
|
|
274
254
|
}
|
|
@@ -284,7 +264,7 @@ export const de_GetAccessKeyInfoCommand = async (output, context) => {
|
|
|
284
264
|
$metadata: deserializeMetadata(output),
|
|
285
265
|
...contents,
|
|
286
266
|
};
|
|
287
|
-
return
|
|
267
|
+
return response;
|
|
288
268
|
};
|
|
289
269
|
const de_GetAccessKeyInfoCommandError = async (output, context) => {
|
|
290
270
|
const parsedOutput = {
|
|
@@ -293,10 +273,9 @@ const de_GetAccessKeyInfoCommandError = async (output, context) => {
|
|
|
293
273
|
};
|
|
294
274
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
295
275
|
const parsedBody = parsedOutput.body;
|
|
296
|
-
throwDefaultError({
|
|
276
|
+
return throwDefaultError({
|
|
297
277
|
output,
|
|
298
278
|
parsedBody: parsedBody.Error,
|
|
299
|
-
exceptionCtor: __BaseException,
|
|
300
279
|
errorCode,
|
|
301
280
|
});
|
|
302
281
|
};
|
|
@@ -311,7 +290,7 @@ export const de_GetCallerIdentityCommand = async (output, context) => {
|
|
|
311
290
|
$metadata: deserializeMetadata(output),
|
|
312
291
|
...contents,
|
|
313
292
|
};
|
|
314
|
-
return
|
|
293
|
+
return response;
|
|
315
294
|
};
|
|
316
295
|
const de_GetCallerIdentityCommandError = async (output, context) => {
|
|
317
296
|
const parsedOutput = {
|
|
@@ -320,10 +299,9 @@ const de_GetCallerIdentityCommandError = async (output, context) => {
|
|
|
320
299
|
};
|
|
321
300
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
322
301
|
const parsedBody = parsedOutput.body;
|
|
323
|
-
throwDefaultError({
|
|
302
|
+
return throwDefaultError({
|
|
324
303
|
output,
|
|
325
304
|
parsedBody: parsedBody.Error,
|
|
326
|
-
exceptionCtor: __BaseException,
|
|
327
305
|
errorCode,
|
|
328
306
|
});
|
|
329
307
|
};
|
|
@@ -338,7 +316,7 @@ export const de_GetFederationTokenCommand = async (output, context) => {
|
|
|
338
316
|
$metadata: deserializeMetadata(output),
|
|
339
317
|
...contents,
|
|
340
318
|
};
|
|
341
|
-
return
|
|
319
|
+
return response;
|
|
342
320
|
};
|
|
343
321
|
const de_GetFederationTokenCommandError = async (output, context) => {
|
|
344
322
|
const parsedOutput = {
|
|
@@ -358,10 +336,9 @@ const de_GetFederationTokenCommandError = async (output, context) => {
|
|
|
358
336
|
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
359
337
|
default:
|
|
360
338
|
const parsedBody = parsedOutput.body;
|
|
361
|
-
throwDefaultError({
|
|
339
|
+
return throwDefaultError({
|
|
362
340
|
output,
|
|
363
341
|
parsedBody: parsedBody.Error,
|
|
364
|
-
exceptionCtor: __BaseException,
|
|
365
342
|
errorCode,
|
|
366
343
|
});
|
|
367
344
|
}
|
|
@@ -377,7 +354,7 @@ export const de_GetSessionTokenCommand = async (output, context) => {
|
|
|
377
354
|
$metadata: deserializeMetadata(output),
|
|
378
355
|
...contents,
|
|
379
356
|
};
|
|
380
|
-
return
|
|
357
|
+
return response;
|
|
381
358
|
};
|
|
382
359
|
const de_GetSessionTokenCommandError = async (output, context) => {
|
|
383
360
|
const parsedOutput = {
|
|
@@ -391,10 +368,9 @@ const de_GetSessionTokenCommandError = async (output, context) => {
|
|
|
391
368
|
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
392
369
|
default:
|
|
393
370
|
const parsedBody = parsedOutput.body;
|
|
394
|
-
throwDefaultError({
|
|
371
|
+
return throwDefaultError({
|
|
395
372
|
output,
|
|
396
373
|
parsedBody: parsedBody.Error,
|
|
397
|
-
exceptionCtor: __BaseException,
|
|
398
374
|
errorCode,
|
|
399
375
|
});
|
|
400
376
|
}
|
|
@@ -937,6 +913,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
937
913
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
938
914
|
};
|
|
939
915
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
916
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
940
917
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
941
918
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
942
919
|
const contents = {
|
|
@@ -955,6 +932,9 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
955
932
|
}
|
|
956
933
|
return new __HttpRequest(contents);
|
|
957
934
|
};
|
|
935
|
+
const SHARED_HEADERS = {
|
|
936
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
937
|
+
};
|
|
958
938
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
959
939
|
if (encoded.length) {
|
|
960
940
|
const parser = new XMLParser({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sts",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.315.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
25
25
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
26
26
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
27
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
27
|
+
"@aws-sdk/credential-provider-node": "3.315.0",
|
|
28
28
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
29
29
|
"@aws-sdk/hash-node": "3.310.0",
|
|
30
30
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
43
43
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
44
44
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
45
|
-
"@aws-sdk/smithy-client": "3.
|
|
45
|
+
"@aws-sdk/smithy-client": "3.315.0",
|
|
46
46
|
"@aws-sdk/types": "3.310.0",
|
|
47
47
|
"@aws-sdk/url-parser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-base64": "3.310.0",
|
|
49
49
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
50
50
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
51
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
52
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
51
|
+
"@aws-sdk/util-defaults-mode-browser": "3.315.0",
|
|
52
|
+
"@aws-sdk/util-defaults-mode-node": "3.315.0",
|
|
53
53
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
54
54
|
"@aws-sdk/util-retry": "3.310.0",
|
|
55
55
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|