@aws-sdk/client-sts 3.525.0 → 3.529.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.
- package/dist-cjs/index.js +10 -43
- package/dist-es/protocols/Aws_query.js +2 -34
- package/package.json +3 -4
package/dist-cjs/index.js
CHANGED
|
@@ -255,9 +255,9 @@ var GetSessionTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) =>
|
|
|
255
255
|
}), "GetSessionTokenResponseFilterSensitiveLog");
|
|
256
256
|
|
|
257
257
|
// src/protocols/Aws_query.ts
|
|
258
|
+
var import_core = require("@aws-sdk/core");
|
|
258
259
|
var import_protocol_http = require("@smithy/protocol-http");
|
|
259
260
|
|
|
260
|
-
var import_fast_xml_parser = require("fast-xml-parser");
|
|
261
261
|
var se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
262
262
|
const headers = SHARED_HEADERS;
|
|
263
263
|
let body;
|
|
@@ -342,7 +342,7 @@ var de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
342
342
|
if (output.statusCode >= 300) {
|
|
343
343
|
return de_CommandError(output, context);
|
|
344
344
|
}
|
|
345
|
-
const data = await
|
|
345
|
+
const data = await (0, import_core.parseXmlBody)(output.body, context);
|
|
346
346
|
let contents = {};
|
|
347
347
|
contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);
|
|
348
348
|
const response = {
|
|
@@ -355,7 +355,7 @@ var de_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
355
355
|
if (output.statusCode >= 300) {
|
|
356
356
|
return de_CommandError(output, context);
|
|
357
357
|
}
|
|
358
|
-
const data = await
|
|
358
|
+
const data = await (0, import_core.parseXmlBody)(output.body, context);
|
|
359
359
|
let contents = {};
|
|
360
360
|
contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context);
|
|
361
361
|
const response = {
|
|
@@ -368,7 +368,7 @@ var de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output,
|
|
|
368
368
|
if (output.statusCode >= 300) {
|
|
369
369
|
return de_CommandError(output, context);
|
|
370
370
|
}
|
|
371
|
-
const data = await
|
|
371
|
+
const data = await (0, import_core.parseXmlBody)(output.body, context);
|
|
372
372
|
let contents = {};
|
|
373
373
|
contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);
|
|
374
374
|
const response = {
|
|
@@ -381,7 +381,7 @@ var de_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (output,
|
|
|
381
381
|
if (output.statusCode >= 300) {
|
|
382
382
|
return de_CommandError(output, context);
|
|
383
383
|
}
|
|
384
|
-
const data = await
|
|
384
|
+
const data = await (0, import_core.parseXmlBody)(output.body, context);
|
|
385
385
|
let contents = {};
|
|
386
386
|
contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context);
|
|
387
387
|
const response = {
|
|
@@ -394,7 +394,7 @@ var de_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
394
394
|
if (output.statusCode >= 300) {
|
|
395
395
|
return de_CommandError(output, context);
|
|
396
396
|
}
|
|
397
|
-
const data = await
|
|
397
|
+
const data = await (0, import_core.parseXmlBody)(output.body, context);
|
|
398
398
|
let contents = {};
|
|
399
399
|
contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context);
|
|
400
400
|
const response = {
|
|
@@ -407,7 +407,7 @@ var de_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
407
407
|
if (output.statusCode >= 300) {
|
|
408
408
|
return de_CommandError(output, context);
|
|
409
409
|
}
|
|
410
|
-
const data = await
|
|
410
|
+
const data = await (0, import_core.parseXmlBody)(output.body, context);
|
|
411
411
|
let contents = {};
|
|
412
412
|
contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context);
|
|
413
413
|
const response = {
|
|
@@ -420,7 +420,7 @@ var de_GetFederationTokenCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
420
420
|
if (output.statusCode >= 300) {
|
|
421
421
|
return de_CommandError(output, context);
|
|
422
422
|
}
|
|
423
|
-
const data = await
|
|
423
|
+
const data = await (0, import_core.parseXmlBody)(output.body, context);
|
|
424
424
|
let contents = {};
|
|
425
425
|
contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context);
|
|
426
426
|
const response = {
|
|
@@ -433,7 +433,7 @@ var de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
433
433
|
if (output.statusCode >= 300) {
|
|
434
434
|
return de_CommandError(output, context);
|
|
435
435
|
}
|
|
436
|
-
const data = await
|
|
436
|
+
const data = await (0, import_core.parseXmlBody)(output.body, context);
|
|
437
437
|
let contents = {};
|
|
438
438
|
contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context);
|
|
439
439
|
const response = {
|
|
@@ -445,7 +445,7 @@ var de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
445
445
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
446
446
|
const parsedOutput = {
|
|
447
447
|
...output,
|
|
448
|
-
body: await
|
|
448
|
+
body: await (0, import_core.parseXmlErrorBody)(output.body, context)
|
|
449
449
|
};
|
|
450
450
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
451
451
|
switch (errorCode) {
|
|
@@ -1052,7 +1052,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1052
1052
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1053
1053
|
cfId: output.headers["x-amz-cf-id"]
|
|
1054
1054
|
}), "deserializeMetadata");
|
|
1055
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1056
1055
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(STSServiceException);
|
|
1057
1056
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1058
1057
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1131,38 +1130,6 @@ var _Va = "Value";
|
|
|
1131
1130
|
var _WIT = "WebIdentityToken";
|
|
1132
1131
|
var _a = "arn";
|
|
1133
1132
|
var _m = "message";
|
|
1134
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1135
|
-
if (encoded.length) {
|
|
1136
|
-
const parser = new import_fast_xml_parser.XMLParser({
|
|
1137
|
-
attributeNamePrefix: "",
|
|
1138
|
-
htmlEntities: true,
|
|
1139
|
-
ignoreAttributes: false,
|
|
1140
|
-
ignoreDeclaration: true,
|
|
1141
|
-
parseTagValue: false,
|
|
1142
|
-
trimValues: false,
|
|
1143
|
-
tagValueProcessor: (_2, val) => val.trim() === "" && val.includes("\n") ? "" : void 0
|
|
1144
|
-
});
|
|
1145
|
-
parser.addEntity("#xD", "\r");
|
|
1146
|
-
parser.addEntity("#10", "\n");
|
|
1147
|
-
const parsedObj = parser.parse(encoded);
|
|
1148
|
-
const textNodeName = "#text";
|
|
1149
|
-
const key = Object.keys(parsedObj)[0];
|
|
1150
|
-
const parsedObjToReturn = parsedObj[key];
|
|
1151
|
-
if (parsedObjToReturn[textNodeName]) {
|
|
1152
|
-
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
|
|
1153
|
-
delete parsedObjToReturn[textNodeName];
|
|
1154
|
-
}
|
|
1155
|
-
return (0, import_smithy_client.getValueFromTextNode)(parsedObjToReturn);
|
|
1156
|
-
}
|
|
1157
|
-
return {};
|
|
1158
|
-
}), "parseBody");
|
|
1159
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1160
|
-
const value = await parseBody(errorBody, context);
|
|
1161
|
-
if (value.Error) {
|
|
1162
|
-
value.Error.message = value.Error.message ?? value.Error.Message;
|
|
1163
|
-
}
|
|
1164
|
-
return value;
|
|
1165
|
-
}, "parseErrorBody");
|
|
1166
1133
|
var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString");
|
|
1167
1134
|
var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1168
1135
|
var _a2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { parseXmlBody as parseBody, parseXmlErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
|
-
import { collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
3
|
-
import { XMLParser } from "fast-xml-parser";
|
|
3
|
+
import { collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, withBaseException, } from "@smithy/smithy-client";
|
|
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) => {
|
|
@@ -872,38 +872,6 @@ const _Va = "Value";
|
|
|
872
872
|
const _WIT = "WebIdentityToken";
|
|
873
873
|
const _a = "arn";
|
|
874
874
|
const _m = "message";
|
|
875
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
876
|
-
if (encoded.length) {
|
|
877
|
-
const parser = new XMLParser({
|
|
878
|
-
attributeNamePrefix: "",
|
|
879
|
-
htmlEntities: true,
|
|
880
|
-
ignoreAttributes: false,
|
|
881
|
-
ignoreDeclaration: true,
|
|
882
|
-
parseTagValue: false,
|
|
883
|
-
trimValues: false,
|
|
884
|
-
tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
|
|
885
|
-
});
|
|
886
|
-
parser.addEntity("#xD", "\r");
|
|
887
|
-
parser.addEntity("#10", "\n");
|
|
888
|
-
const parsedObj = parser.parse(encoded);
|
|
889
|
-
const textNodeName = "#text";
|
|
890
|
-
const key = Object.keys(parsedObj)[0];
|
|
891
|
-
const parsedObjToReturn = parsedObj[key];
|
|
892
|
-
if (parsedObjToReturn[textNodeName]) {
|
|
893
|
-
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
|
|
894
|
-
delete parsedObjToReturn[textNodeName];
|
|
895
|
-
}
|
|
896
|
-
return __getValueFromTextNode(parsedObjToReturn);
|
|
897
|
-
}
|
|
898
|
-
return {};
|
|
899
|
-
});
|
|
900
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
901
|
-
const value = await parseBody(errorBody, context);
|
|
902
|
-
if (value.Error) {
|
|
903
|
-
value.Error.message = value.Error.message ?? value.Error.Message;
|
|
904
|
-
}
|
|
905
|
-
return value;
|
|
906
|
-
};
|
|
907
875
|
const buildFormUrlencodedString = (formEntries) => Object.entries(formEntries)
|
|
908
876
|
.map(([key, value]) => __extendedEncodeURIComponent(key) + "=" + __extendedEncodeURIComponent(value))
|
|
909
877
|
.join("&");
|
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.529.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-sts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
24
24
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
25
|
-
"@aws-sdk/core": "3.
|
|
25
|
+
"@aws-sdk/core": "3.529.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.523.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.523.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.523.0",
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
"@smithy/util-middleware": "^2.1.3",
|
|
58
58
|
"@smithy/util-retry": "^2.1.3",
|
|
59
59
|
"@smithy/util-utf8": "^2.1.1",
|
|
60
|
-
"fast-xml-parser": "4.2.5",
|
|
61
60
|
"tslib": "^2.5.0"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|
|
@@ -88,7 +87,7 @@
|
|
|
88
87
|
},
|
|
89
88
|
"license": "Apache-2.0",
|
|
90
89
|
"peerDependencies": {
|
|
91
|
-
"@aws-sdk/credential-provider-node": "^3.
|
|
90
|
+
"@aws-sdk/credential-provider-node": "^3.529.0"
|
|
92
91
|
},
|
|
93
92
|
"browser": {
|
|
94
93
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|