@aws-sdk/client-sts 3.1044.0 → 3.1046.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/auth/httpAuthSchemeProvider.js +11 -17
- package/dist-cjs/endpoint/bdd.js +2 -2
- package/dist-cjs/endpoint/endpointResolver.js +4 -4
- package/dist-cjs/index.js +155 -57
- package/dist-cjs/models/STSServiceException.js +3 -3
- package/dist-cjs/runtimeConfig.browser.js +12 -14
- package/dist-cjs/runtimeConfig.js +19 -23
- package/dist-cjs/runtimeConfig.shared.js +9 -10
- package/dist-es/STS.js +1 -1
- package/dist-es/STSClient.js +5 -5
- package/dist-es/auth/httpAuthSchemeProvider.js +5 -10
- package/dist-es/commands/AssumeRoleCommand.js +2 -2
- package/dist-es/commands/AssumeRoleWithSAMLCommand.js +2 -2
- package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +2 -2
- package/dist-es/commands/AssumeRootCommand.js +2 -2
- package/dist-es/commands/DecodeAuthorizationMessageCommand.js +2 -2
- package/dist-es/commands/GetAccessKeyInfoCommand.js +2 -2
- package/dist-es/commands/GetCallerIdentityCommand.js +2 -2
- package/dist-es/commands/GetDelegatedAccessTokenCommand.js +2 -2
- package/dist-es/commands/GetFederationTokenCommand.js +2 -2
- package/dist-es/commands/GetSessionTokenCommand.js +2 -2
- package/dist-es/commands/GetWebIdentityTokenCommand.js +2 -2
- package/dist-es/defaultStsRoleAssumers.js +0 -5
- package/dist-es/endpoint/bdd.js +1 -1
- package/dist-es/endpoint/endpointResolver.js +1 -1
- package/dist-es/models/STSServiceException.js +1 -1
- package/dist-es/runtimeConfig.browser.js +4 -6
- package/dist-es/runtimeConfig.js +4 -8
- package/dist-es/runtimeConfig.shared.js +3 -4
- package/dist-es/runtimeExtensions.js +2 -2
- package/dist-types/STSClient.d.ts +5 -5
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +3 -13
- package/dist-types/commands/AssumeRoleCommand.d.ts +6 -4
- package/dist-types/commands/AssumeRoleWithSAMLCommand.d.ts +6 -4
- package/dist-types/commands/AssumeRoleWithWebIdentityCommand.d.ts +6 -4
- package/dist-types/commands/AssumeRootCommand.d.ts +6 -4
- package/dist-types/commands/DecodeAuthorizationMessageCommand.d.ts +6 -4
- package/dist-types/commands/GetAccessKeyInfoCommand.d.ts +6 -4
- package/dist-types/commands/GetCallerIdentityCommand.d.ts +6 -4
- package/dist-types/commands/GetDelegatedAccessTokenCommand.d.ts +6 -4
- package/dist-types/commands/GetFederationTokenCommand.d.ts +6 -4
- package/dist-types/commands/GetSessionTokenCommand.d.ts +6 -4
- package/dist-types/commands/GetWebIdentityTokenCommand.d.ts +6 -4
- package/dist-types/defaultStsRoleAssumers.d.ts +0 -9
- package/dist-types/endpoint/bdd.d.ts +1 -1
- package/dist-types/extensionConfiguration.d.ts +1 -1
- package/dist-types/models/STSServiceException.d.ts +1 -1
- package/dist-types/models/errors.d.ts +1 -1
- package/dist-types/runtimeConfig.browser.d.ts +3 -3
- package/dist-types/runtimeConfig.d.ts +3 -3
- package/dist-types/runtimeConfig.native.d.ts +3 -3
- package/dist-types/runtimeConfig.shared.d.ts +1 -1
- package/dist-types/ts3.4/STSClient.d.ts +8 -14
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +2 -12
- package/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/AssumeRootCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/GetDelegatedAccessTokenCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/GetWebIdentityTokenCommand.d.ts +6 -4
- package/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +0 -3
- package/dist-types/ts3.4/endpoint/bdd.d.ts +1 -1
- package/dist-types/ts3.4/extensionConfiguration.d.ts +1 -1
- package/dist-types/ts3.4/models/STSServiceException.d.ts +1 -1
- package/dist-types/ts3.4/models/errors.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -4
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -4
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -2
- package/package.json +15 -36
- package/dist-cjs/STSClient.js +0 -55
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -43
- package/dist-cjs/endpoint/EndpointParameters.js +0 -19
- package/dist-cjs/runtimeExtensions.js +0 -13
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveHttpAuthSchemeConfig = exports.
|
|
3
|
+
exports.resolveHttpAuthSchemeConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0;
|
|
4
4
|
const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
|
|
5
5
|
const signature_v4_multi_region_1 = require("@aws-sdk/signature-v4-multi-region");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const client_1 = require("@smithy/core/client");
|
|
7
|
+
const endpoints_1 = require("@smithy/core/endpoints");
|
|
8
8
|
const endpointResolver_1 = require("../endpoint/endpointResolver");
|
|
9
|
-
const STSClient_1 = require("../STSClient");
|
|
10
9
|
const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
|
|
11
10
|
if (!input) {
|
|
12
11
|
throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
|
|
13
12
|
}
|
|
14
13
|
const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
|
|
15
|
-
const instructionsFn = (0,
|
|
14
|
+
const instructionsFn = (0, client_1.getSmithyContext)(context)?.commandInstance?.constructor
|
|
16
15
|
?.getEndpointParameterInstructions;
|
|
17
16
|
if (!instructionsFn) {
|
|
18
17
|
throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
|
|
19
18
|
}
|
|
20
|
-
const endpointParameters = await (0,
|
|
19
|
+
const endpointParameters = await (0, endpoints_1.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config);
|
|
21
20
|
return Object.assign(defaultParameters, endpointParameters);
|
|
22
21
|
};
|
|
23
22
|
const _defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
24
23
|
return {
|
|
25
|
-
operation: (0,
|
|
26
|
-
region: await (0,
|
|
24
|
+
operation: (0, client_1.getSmithyContext)(context).operation,
|
|
25
|
+
region: await (0, client_1.normalizeProvider)(config.region)() || (() => {
|
|
27
26
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
28
27
|
})(),
|
|
29
28
|
};
|
|
@@ -133,16 +132,11 @@ exports.defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemePr
|
|
|
133
132
|
"aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
|
|
134
133
|
"smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption,
|
|
135
134
|
});
|
|
136
|
-
const resolveStsAuthConfig = (input) => Object.assign(input, {
|
|
137
|
-
stsClientCtor: STSClient_1.STSClient,
|
|
138
|
-
});
|
|
139
|
-
exports.resolveStsAuthConfig = resolveStsAuthConfig;
|
|
140
135
|
const resolveHttpAuthSchemeConfig = (config) => {
|
|
141
|
-
const config_0 = (0,
|
|
142
|
-
const config_1 = (0, httpAuthSchemes_1.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
|
|
136
|
+
const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config);
|
|
137
|
+
const config_1 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4AConfig)(config_0);
|
|
138
|
+
return Object.assign(config_1, {
|
|
139
|
+
authSchemePreference: (0, client_1.normalizeProvider)(config.authSchemePreference ?? []),
|
|
146
140
|
});
|
|
147
141
|
};
|
|
148
142
|
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
package/dist-cjs/endpoint/bdd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.bdd = void 0;
|
|
4
|
-
const
|
|
4
|
+
const endpoints_1 = require("@smithy/core/endpoints");
|
|
5
5
|
const q = "ref";
|
|
6
6
|
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "stringEquals", g = "getAttr", h = "us-east-1", i = "sigv4", j = "sts", k = "https://sts.{Region}.{PartitionResult#dnsSuffix}", l = { [q]: "Endpoint" }, m = { [q]: "Region" }, n = { [q]: d }, o = {}, p = [m];
|
|
7
7
|
const _data = {
|
|
@@ -85,4 +85,4 @@ const nodes = new Int32Array([
|
|
|
85
85
|
3, r + 3, 31,
|
|
86
86
|
4, r + 4, r + 5,
|
|
87
87
|
]);
|
|
88
|
-
exports.bdd =
|
|
88
|
+
exports.bdd = endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultEndpointResolver = void 0;
|
|
4
4
|
const util_endpoints_1 = require("@aws-sdk/util-endpoints");
|
|
5
|
-
const
|
|
5
|
+
const endpoints_1 = require("@smithy/core/endpoints");
|
|
6
6
|
const bdd_1 = require("./bdd");
|
|
7
|
-
const cache = new
|
|
7
|
+
const cache = new endpoints_1.EndpointCache({
|
|
8
8
|
size: 50,
|
|
9
9
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"],
|
|
10
10
|
});
|
|
11
11
|
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
12
|
-
return cache.get(endpointParams, () => (0,
|
|
12
|
+
return cache.get(endpointParams, () => (0, endpoints_1.decideEndpoint)(bdd_1.bdd, {
|
|
13
13
|
endpointParams: endpointParams,
|
|
14
14
|
logger: context.logger,
|
|
15
15
|
}));
|
|
16
16
|
};
|
|
17
17
|
exports.defaultEndpointResolver = defaultEndpointResolver;
|
|
18
|
-
|
|
18
|
+
endpoints_1.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,20 +1,126 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
|
|
4
|
+
var middlewareLogger = require('@aws-sdk/middleware-logger');
|
|
5
|
+
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
|
|
6
|
+
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
|
+
var core = require('@smithy/core');
|
|
8
|
+
var client = require('@smithy/core/client');
|
|
9
|
+
var config = require('@smithy/core/config');
|
|
10
|
+
var endpoints = require('@smithy/core/endpoints');
|
|
11
|
+
var protocols = require('@smithy/core/protocols');
|
|
12
|
+
var retry = require('@smithy/core/retry');
|
|
13
|
+
var schema = require('@smithy/core/schema');
|
|
14
|
+
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
15
|
+
var runtimeConfig = require('./runtimeConfig');
|
|
16
|
+
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
7
17
|
var schemas_0 = require('./schemas/schemas_0');
|
|
8
18
|
var errors = require('./models/errors');
|
|
9
|
-
var client = require('@aws-sdk/core/client');
|
|
10
|
-
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
19
|
+
var client$1 = require('@aws-sdk/core/client');
|
|
11
20
|
var STSServiceException = require('./models/STSServiceException');
|
|
12
21
|
|
|
13
|
-
|
|
22
|
+
const resolveClientEndpointParameters = (options) => {
|
|
23
|
+
return Object.assign(options, {
|
|
24
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
25
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
26
|
+
useGlobalEndpoint: options.useGlobalEndpoint ?? false,
|
|
27
|
+
defaultSigningName: "sts",
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
const commonParams = {
|
|
31
|
+
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
|
32
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
33
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
34
|
+
Region: { type: "builtInParams", name: "region" },
|
|
35
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
39
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
40
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
41
|
+
let _credentials = runtimeConfig.credentials;
|
|
42
|
+
return {
|
|
43
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
44
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
45
|
+
if (index === -1) {
|
|
46
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
httpAuthSchemes() {
|
|
53
|
+
return _httpAuthSchemes;
|
|
54
|
+
},
|
|
55
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
56
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
57
|
+
},
|
|
58
|
+
httpAuthSchemeProvider() {
|
|
59
|
+
return _httpAuthSchemeProvider;
|
|
60
|
+
},
|
|
61
|
+
setCredentials(credentials) {
|
|
62
|
+
_credentials = credentials;
|
|
63
|
+
},
|
|
64
|
+
credentials() {
|
|
65
|
+
return _credentials;
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
70
|
+
return {
|
|
71
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
72
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
73
|
+
credentials: config.credentials(),
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
78
|
+
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
79
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
80
|
+
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
class STSClient extends client.Client {
|
|
84
|
+
config;
|
|
85
|
+
constructor(...[configuration]) {
|
|
86
|
+
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
|
87
|
+
super(_config_0);
|
|
88
|
+
this.initConfig = _config_0;
|
|
89
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
90
|
+
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
91
|
+
const _config_3 = retry.resolveRetryConfig(_config_2);
|
|
92
|
+
const _config_4 = config.resolveRegionConfig(_config_3);
|
|
93
|
+
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
94
|
+
const _config_6 = endpoints.resolveEndpointConfig(_config_5);
|
|
95
|
+
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
96
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
97
|
+
this.config = _config_8;
|
|
98
|
+
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
100
|
+
this.middlewareStack.use(retry.getRetryPlugin(this.config));
|
|
101
|
+
this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));
|
|
102
|
+
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
103
|
+
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
104
|
+
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
105
|
+
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
106
|
+
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSTSHttpAuthSchemeParametersProvider,
|
|
107
|
+
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
108
|
+
"aws.auth#sigv4": config.credentials,
|
|
109
|
+
"aws.auth#sigv4a": config.credentials,
|
|
110
|
+
}),
|
|
111
|
+
}));
|
|
112
|
+
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
113
|
+
}
|
|
114
|
+
destroy() {
|
|
115
|
+
super.destroy();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
class AssumeRoleCommand extends client.Command
|
|
14
120
|
.classBuilder()
|
|
15
|
-
.ep(
|
|
121
|
+
.ep(commonParams)
|
|
16
122
|
.m(function (Command, cs, config, o) {
|
|
17
|
-
return [
|
|
123
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
18
124
|
})
|
|
19
125
|
.s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
|
|
20
126
|
.n("STSClient", "AssumeRoleCommand")
|
|
@@ -22,11 +128,11 @@ class AssumeRoleCommand extends smithyClient.Command
|
|
|
22
128
|
.build() {
|
|
23
129
|
}
|
|
24
130
|
|
|
25
|
-
class AssumeRoleWithSAMLCommand extends
|
|
131
|
+
class AssumeRoleWithSAMLCommand extends client.Command
|
|
26
132
|
.classBuilder()
|
|
27
|
-
.ep(
|
|
133
|
+
.ep(commonParams)
|
|
28
134
|
.m(function (Command, cs, config, o) {
|
|
29
|
-
return [
|
|
135
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
30
136
|
})
|
|
31
137
|
.s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {})
|
|
32
138
|
.n("STSClient", "AssumeRoleWithSAMLCommand")
|
|
@@ -34,11 +140,11 @@ class AssumeRoleWithSAMLCommand extends smithyClient.Command
|
|
|
34
140
|
.build() {
|
|
35
141
|
}
|
|
36
142
|
|
|
37
|
-
class AssumeRoleWithWebIdentityCommand extends
|
|
143
|
+
class AssumeRoleWithWebIdentityCommand extends client.Command
|
|
38
144
|
.classBuilder()
|
|
39
|
-
.ep(
|
|
145
|
+
.ep(commonParams)
|
|
40
146
|
.m(function (Command, cs, config, o) {
|
|
41
|
-
return [
|
|
147
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
42
148
|
})
|
|
43
149
|
.s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
|
|
44
150
|
.n("STSClient", "AssumeRoleWithWebIdentityCommand")
|
|
@@ -46,11 +152,11 @@ class AssumeRoleWithWebIdentityCommand extends smithyClient.Command
|
|
|
46
152
|
.build() {
|
|
47
153
|
}
|
|
48
154
|
|
|
49
|
-
class AssumeRootCommand extends
|
|
155
|
+
class AssumeRootCommand extends client.Command
|
|
50
156
|
.classBuilder()
|
|
51
|
-
.ep(
|
|
157
|
+
.ep(commonParams)
|
|
52
158
|
.m(function (Command, cs, config, o) {
|
|
53
|
-
return [
|
|
159
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
54
160
|
})
|
|
55
161
|
.s("AWSSecurityTokenServiceV20110615", "AssumeRoot", {})
|
|
56
162
|
.n("STSClient", "AssumeRootCommand")
|
|
@@ -58,11 +164,11 @@ class AssumeRootCommand extends smithyClient.Command
|
|
|
58
164
|
.build() {
|
|
59
165
|
}
|
|
60
166
|
|
|
61
|
-
class DecodeAuthorizationMessageCommand extends
|
|
167
|
+
class DecodeAuthorizationMessageCommand extends client.Command
|
|
62
168
|
.classBuilder()
|
|
63
|
-
.ep(
|
|
169
|
+
.ep(commonParams)
|
|
64
170
|
.m(function (Command, cs, config, o) {
|
|
65
|
-
return [
|
|
171
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
66
172
|
})
|
|
67
173
|
.s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {})
|
|
68
174
|
.n("STSClient", "DecodeAuthorizationMessageCommand")
|
|
@@ -70,11 +176,11 @@ class DecodeAuthorizationMessageCommand extends smithyClient.Command
|
|
|
70
176
|
.build() {
|
|
71
177
|
}
|
|
72
178
|
|
|
73
|
-
class GetAccessKeyInfoCommand extends
|
|
179
|
+
class GetAccessKeyInfoCommand extends client.Command
|
|
74
180
|
.classBuilder()
|
|
75
|
-
.ep(
|
|
181
|
+
.ep(commonParams)
|
|
76
182
|
.m(function (Command, cs, config, o) {
|
|
77
|
-
return [
|
|
183
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
78
184
|
})
|
|
79
185
|
.s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {})
|
|
80
186
|
.n("STSClient", "GetAccessKeyInfoCommand")
|
|
@@ -82,11 +188,11 @@ class GetAccessKeyInfoCommand extends smithyClient.Command
|
|
|
82
188
|
.build() {
|
|
83
189
|
}
|
|
84
190
|
|
|
85
|
-
class GetCallerIdentityCommand extends
|
|
191
|
+
class GetCallerIdentityCommand extends client.Command
|
|
86
192
|
.classBuilder()
|
|
87
|
-
.ep(
|
|
193
|
+
.ep(commonParams)
|
|
88
194
|
.m(function (Command, cs, config, o) {
|
|
89
|
-
return [
|
|
195
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
90
196
|
})
|
|
91
197
|
.s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {})
|
|
92
198
|
.n("STSClient", "GetCallerIdentityCommand")
|
|
@@ -94,11 +200,11 @@ class GetCallerIdentityCommand extends smithyClient.Command
|
|
|
94
200
|
.build() {
|
|
95
201
|
}
|
|
96
202
|
|
|
97
|
-
class GetDelegatedAccessTokenCommand extends
|
|
203
|
+
class GetDelegatedAccessTokenCommand extends client.Command
|
|
98
204
|
.classBuilder()
|
|
99
|
-
.ep(
|
|
205
|
+
.ep(commonParams)
|
|
100
206
|
.m(function (Command, cs, config, o) {
|
|
101
|
-
return [
|
|
207
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
102
208
|
})
|
|
103
209
|
.s("AWSSecurityTokenServiceV20110615", "GetDelegatedAccessToken", {})
|
|
104
210
|
.n("STSClient", "GetDelegatedAccessTokenCommand")
|
|
@@ -106,11 +212,11 @@ class GetDelegatedAccessTokenCommand extends smithyClient.Command
|
|
|
106
212
|
.build() {
|
|
107
213
|
}
|
|
108
214
|
|
|
109
|
-
class GetFederationTokenCommand extends
|
|
215
|
+
class GetFederationTokenCommand extends client.Command
|
|
110
216
|
.classBuilder()
|
|
111
|
-
.ep(
|
|
217
|
+
.ep(commonParams)
|
|
112
218
|
.m(function (Command, cs, config, o) {
|
|
113
|
-
return [
|
|
219
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
114
220
|
})
|
|
115
221
|
.s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {})
|
|
116
222
|
.n("STSClient", "GetFederationTokenCommand")
|
|
@@ -118,11 +224,11 @@ class GetFederationTokenCommand extends smithyClient.Command
|
|
|
118
224
|
.build() {
|
|
119
225
|
}
|
|
120
226
|
|
|
121
|
-
class GetSessionTokenCommand extends
|
|
227
|
+
class GetSessionTokenCommand extends client.Command
|
|
122
228
|
.classBuilder()
|
|
123
|
-
.ep(
|
|
229
|
+
.ep(commonParams)
|
|
124
230
|
.m(function (Command, cs, config, o) {
|
|
125
|
-
return [
|
|
231
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
126
232
|
})
|
|
127
233
|
.s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {})
|
|
128
234
|
.n("STSClient", "GetSessionTokenCommand")
|
|
@@ -130,11 +236,11 @@ class GetSessionTokenCommand extends smithyClient.Command
|
|
|
130
236
|
.build() {
|
|
131
237
|
}
|
|
132
238
|
|
|
133
|
-
class GetWebIdentityTokenCommand extends
|
|
239
|
+
class GetWebIdentityTokenCommand extends client.Command
|
|
134
240
|
.classBuilder()
|
|
135
|
-
.ep(
|
|
241
|
+
.ep(commonParams)
|
|
136
242
|
.m(function (Command, cs, config, o) {
|
|
137
|
-
return [
|
|
243
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
138
244
|
})
|
|
139
245
|
.s("AWSSecurityTokenServiceV20110615", "GetWebIdentityToken", {})
|
|
140
246
|
.n("STSClient", "GetWebIdentityTokenCommand")
|
|
@@ -155,9 +261,9 @@ const commands = {
|
|
|
155
261
|
GetSessionTokenCommand,
|
|
156
262
|
GetWebIdentityTokenCommand,
|
|
157
263
|
};
|
|
158
|
-
class STS extends STSClient
|
|
264
|
+
class STS extends STSClient {
|
|
159
265
|
}
|
|
160
|
-
|
|
266
|
+
client.createAggregatedClient(commands, STS);
|
|
161
267
|
|
|
162
268
|
const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
|
163
269
|
if (typeof assumedRoleUser?.Arn === "string") {
|
|
@@ -211,7 +317,7 @@ const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
|
|
|
211
317
|
...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),
|
|
212
318
|
...(accountId && { accountId }),
|
|
213
319
|
};
|
|
214
|
-
client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
|
|
320
|
+
client$1.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
|
|
215
321
|
return credentials;
|
|
216
322
|
};
|
|
217
323
|
};
|
|
@@ -248,9 +354,9 @@ const getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => {
|
|
|
248
354
|
...(accountId && { accountId }),
|
|
249
355
|
};
|
|
250
356
|
if (accountId) {
|
|
251
|
-
client.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
|
|
357
|
+
client$1.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
|
|
252
358
|
}
|
|
253
|
-
client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
|
|
359
|
+
client$1.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
|
|
254
360
|
return credentials;
|
|
255
361
|
};
|
|
256
362
|
};
|
|
@@ -271,15 +377,16 @@ const getCustomizableStsClientCtor = (baseCtor, customizations) => {
|
|
|
271
377
|
}
|
|
272
378
|
};
|
|
273
379
|
};
|
|
274
|
-
const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient
|
|
275
|
-
const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient
|
|
380
|
+
const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
381
|
+
const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
276
382
|
const decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
|
277
383
|
roleAssumer: getDefaultRoleAssumer(input),
|
|
278
384
|
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),
|
|
279
385
|
...input,
|
|
280
386
|
});
|
|
281
387
|
|
|
282
|
-
exports.$Command =
|
|
388
|
+
exports.$Command = client.Command;
|
|
389
|
+
exports.__Client = client.Client;
|
|
283
390
|
exports.STSServiceException = STSServiceException.STSServiceException;
|
|
284
391
|
exports.AssumeRoleCommand = AssumeRoleCommand;
|
|
285
392
|
exports.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand;
|
|
@@ -293,19 +400,10 @@ exports.GetFederationTokenCommand = GetFederationTokenCommand;
|
|
|
293
400
|
exports.GetSessionTokenCommand = GetSessionTokenCommand;
|
|
294
401
|
exports.GetWebIdentityTokenCommand = GetWebIdentityTokenCommand;
|
|
295
402
|
exports.STS = STS;
|
|
403
|
+
exports.STSClient = STSClient;
|
|
296
404
|
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
|
|
297
405
|
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
|
298
406
|
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
|
299
|
-
Object.prototype.hasOwnProperty.call(STSClient, '__proto__') &&
|
|
300
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
301
|
-
Object.defineProperty(exports, '__proto__', {
|
|
302
|
-
enumerable: true,
|
|
303
|
-
value: STSClient['__proto__']
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
Object.keys(STSClient).forEach(function (k) {
|
|
307
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = STSClient[k];
|
|
308
|
-
});
|
|
309
407
|
Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
|
|
310
408
|
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
311
409
|
Object.defineProperty(exports, '__proto__', {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.STSServiceException = exports.__ServiceException = void 0;
|
|
4
|
-
const
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return
|
|
6
|
-
class STSServiceException extends
|
|
4
|
+
const client_1 = require("@smithy/core/client");
|
|
5
|
+
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
|
|
6
|
+
class STSServiceException extends client_1.ServiceException {
|
|
7
7
|
constructor(options) {
|
|
8
8
|
super(options);
|
|
9
9
|
Object.setPrototypeOf(this, STSServiceException.prototype);
|
|
@@ -5,34 +5,32 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
6
|
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
7
7
|
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
8
|
-
const
|
|
8
|
+
const client_1 = require("@smithy/core/client");
|
|
9
|
+
const config_1 = require("@smithy/core/config");
|
|
10
|
+
const retry_1 = require("@smithy/core/retry");
|
|
11
|
+
const serde_1 = require("@smithy/core/serde");
|
|
9
12
|
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
10
|
-
const invalid_dependency_1 = require("@smithy/invalid-dependency");
|
|
11
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
12
|
-
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
|
13
|
-
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
|
|
14
|
-
const util_retry_1 = require("@smithy/util-retry");
|
|
15
13
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
16
14
|
const getRuntimeConfig = (config) => {
|
|
17
|
-
const defaultsMode = (0,
|
|
18
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
15
|
+
const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(client_1.loadConfigsForDefaultMode);
|
|
19
17
|
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
20
18
|
return {
|
|
21
19
|
...clientSharedValues,
|
|
22
20
|
...config,
|
|
23
21
|
runtime: "browser",
|
|
24
22
|
defaultsMode,
|
|
25
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
23
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
|
|
26
24
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
27
25
|
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
28
|
-
maxAttempts: config?.maxAttempts ??
|
|
29
|
-
region: config?.region ?? (0,
|
|
26
|
+
maxAttempts: config?.maxAttempts ?? retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
27
|
+
region: config?.region ?? (0, client_1.invalidProvider)("Region is missing"),
|
|
30
28
|
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
31
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode ||
|
|
29
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE),
|
|
32
30
|
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
33
31
|
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
34
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(
|
|
35
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(
|
|
32
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
33
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
|
36
34
|
};
|
|
37
35
|
};
|
|
38
36
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -7,21 +7,17 @@ const client_1 = require("@aws-sdk/core/client");
|
|
|
7
7
|
const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
|
|
8
8
|
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
9
9
|
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
10
|
-
const config_resolver_1 = require("@smithy/config-resolver");
|
|
11
10
|
const core_1 = require("@smithy/core");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
11
|
+
const client_2 = require("@smithy/core/client");
|
|
12
|
+
const config_1 = require("@smithy/core/config");
|
|
13
|
+
const retry_1 = require("@smithy/core/retry");
|
|
14
|
+
const serde_1 = require("@smithy/core/serde");
|
|
15
15
|
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
16
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
17
|
-
const util_body_length_node_1 = require("@smithy/util-body-length-node");
|
|
18
|
-
const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
|
|
19
|
-
const util_retry_1 = require("@smithy/util-retry");
|
|
20
16
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
21
17
|
const getRuntimeConfig = (config) => {
|
|
22
|
-
(0,
|
|
23
|
-
const defaultsMode = (0,
|
|
24
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
18
|
+
(0, client_2.emitWarningIfUnsupportedVersion)(process.version);
|
|
19
|
+
const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
|
|
20
|
+
const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
|
|
25
21
|
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
26
22
|
(0, client_1.emitWarningIfUnsupportedVersion)(process.version);
|
|
27
23
|
const loaderConfig = {
|
|
@@ -33,8 +29,8 @@ const getRuntimeConfig = (config) => {
|
|
|
33
29
|
...config,
|
|
34
30
|
runtime: "node",
|
|
35
31
|
defaultsMode,
|
|
36
|
-
authSchemePreference: config?.authSchemePreference ?? (0,
|
|
37
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
32
|
+
authSchemePreference: config?.authSchemePreference ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
33
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
|
|
38
34
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
|
|
39
35
|
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
40
36
|
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
@@ -54,20 +50,20 @@ const getRuntimeConfig = (config) => {
|
|
|
54
50
|
signer: new core_1.NoAuthSigner(),
|
|
55
51
|
},
|
|
56
52
|
],
|
|
57
|
-
maxAttempts: config?.maxAttempts ?? (0,
|
|
58
|
-
region: config?.region ?? (0,
|
|
53
|
+
maxAttempts: config?.maxAttempts ?? (0, config_1.loadConfig)(retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
54
|
+
region: config?.region ?? (0, config_1.loadConfig)(config_1.NODE_REGION_CONFIG_OPTIONS, { ...config_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
59
55
|
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
60
56
|
retryMode: config?.retryMode ??
|
|
61
|
-
(0,
|
|
62
|
-
...
|
|
63
|
-
default: async () => (await defaultConfigProvider()).retryMode ||
|
|
57
|
+
(0, config_1.loadConfig)({
|
|
58
|
+
...retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
59
|
+
default: async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE,
|
|
64
60
|
}, config),
|
|
65
|
-
sha256: config?.sha256 ??
|
|
66
|
-
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0,
|
|
61
|
+
sha256: config?.sha256 ?? serde_1.Hash.bind(null, "sha256"),
|
|
62
|
+
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
|
|
67
63
|
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
68
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0,
|
|
69
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (0,
|
|
70
|
-
userAgentAppId: config?.userAgentAppId ?? (0,
|
|
64
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
65
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
66
|
+
userAgentAppId: config?.userAgentAppId ?? (0, config_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
71
67
|
};
|
|
72
68
|
};
|
|
73
69
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -5,18 +5,17 @@ const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
|
|
|
5
5
|
const protocols_1 = require("@aws-sdk/core/protocols");
|
|
6
6
|
const signature_v4_multi_region_1 = require("@aws-sdk/signature-v4-multi-region");
|
|
7
7
|
const core_1 = require("@smithy/core");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const util_utf8_1 = require("@smithy/util-utf8");
|
|
8
|
+
const client_1 = require("@smithy/core/client");
|
|
9
|
+
const protocols_2 = require("@smithy/core/protocols");
|
|
10
|
+
const serde_1 = require("@smithy/core/serde");
|
|
12
11
|
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
|
|
13
12
|
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
14
13
|
const schemas_0_1 = require("./schemas/schemas_0");
|
|
15
14
|
const getRuntimeConfig = (config) => {
|
|
16
15
|
return {
|
|
17
16
|
apiVersion: "2011-06-15",
|
|
18
|
-
base64Decoder: config?.base64Decoder ??
|
|
19
|
-
base64Encoder: config?.base64Encoder ??
|
|
17
|
+
base64Decoder: config?.base64Decoder ?? serde_1.fromBase64,
|
|
18
|
+
base64Encoder: config?.base64Encoder ?? serde_1.toBase64,
|
|
20
19
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
21
20
|
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
22
21
|
extensions: config?.extensions ?? [],
|
|
@@ -38,7 +37,7 @@ const getRuntimeConfig = (config) => {
|
|
|
38
37
|
signer: new core_1.NoAuthSigner(),
|
|
39
38
|
},
|
|
40
39
|
],
|
|
41
|
-
logger: config?.logger ?? new
|
|
40
|
+
logger: config?.logger ?? new client_1.NoOpLogger(),
|
|
42
41
|
protocol: config?.protocol ?? protocols_1.AwsQueryProtocol,
|
|
43
42
|
protocolSettings: config?.protocolSettings ?? {
|
|
44
43
|
defaultNamespace: "com.amazonaws.sts",
|
|
@@ -49,9 +48,9 @@ const getRuntimeConfig = (config) => {
|
|
|
49
48
|
},
|
|
50
49
|
serviceId: config?.serviceId ?? "STS",
|
|
51
50
|
signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion,
|
|
52
|
-
urlParser: config?.urlParser ??
|
|
53
|
-
utf8Decoder: config?.utf8Decoder ??
|
|
54
|
-
utf8Encoder: config?.utf8Encoder ??
|
|
51
|
+
urlParser: config?.urlParser ?? protocols_2.parseUrl,
|
|
52
|
+
utf8Decoder: config?.utf8Decoder ?? serde_1.fromUtf8,
|
|
53
|
+
utf8Encoder: config?.utf8Encoder ?? serde_1.toUtf8,
|
|
55
54
|
};
|
|
56
55
|
};
|
|
57
56
|
exports.getRuntimeConfig = getRuntimeConfig;
|
package/dist-es/STS.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createAggregatedClient } from "@smithy/
|
|
1
|
+
import { createAggregatedClient } from "@smithy/core/client";
|
|
2
2
|
import { AssumeRoleCommand, } from "./commands/AssumeRoleCommand";
|
|
3
3
|
import { AssumeRoleWithSAMLCommand, } from "./commands/AssumeRoleWithSAMLCommand";
|
|
4
4
|
import { AssumeRoleWithWebIdentityCommand, } from "./commands/AssumeRoleWithWebIdentityCommand";
|