@aws-sdk/client-sts 3.310.0 → 3.312.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),
@@ -974,6 +958,9 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
974
958
  }
975
959
  return new protocol_http_1.HttpRequest(contents);
976
960
  };
961
+ const SHARED_HEADERS = {
962
+ "content-type": "application/x-www-form-urlencoded",
963
+ };
977
964
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
978
965
  if (encoded.length) {
979
966
  const parser = new fast_xml_parser_1.XMLParser({
@@ -4,9 +4,7 @@ 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),
@@ -955,6 +939,9 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
955
939
  }
956
940
  return new __HttpRequest(contents);
957
941
  };
942
+ const SHARED_HEADERS = {
943
+ "content-type": "application/x-www-form-urlencoded",
944
+ };
958
945
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
959
946
  if (encoded.length) {
960
947
  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.310.0",
4
+ "version": "3.312.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",