@aws-sdk/client-sts 3.33.0 → 3.36.1
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/CHANGELOG.md +47 -0
- package/{dist/cjs → dist-cjs}/STS.js +1 -9
- package/dist-cjs/STSClient.js +34 -0
- package/dist-cjs/commands/AssumeRoleCommand.js +38 -0
- package/dist-cjs/commands/AssumeRoleWithSAMLCommand.js +36 -0
- package/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js +36 -0
- package/dist-cjs/commands/DecodeAuthorizationMessageCommand.js +38 -0
- package/dist-cjs/commands/GetAccessKeyInfoCommand.js +38 -0
- package/dist-cjs/commands/GetCallerIdentityCommand.js +38 -0
- package/dist-cjs/commands/GetFederationTokenCommand.js +38 -0
- package/dist-cjs/commands/GetSessionTokenCommand.js +38 -0
- package/{dist/cjs → dist-cjs}/defaultRoleAssumers.js +0 -17
- package/{dist/cjs → dist-cjs}/defaultStsRoleAssumers.js +0 -21
- package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -88
- package/{dist/cjs → dist-cjs}/protocols/Aws_query.js +22 -25
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
- package/{dist/es → dist-es}/STS.js +2 -10
- package/{dist/es → dist-es}/STSClient.js +2 -15
- package/dist-es/commands/AssumeRoleCommand.js +41 -0
- package/dist-es/commands/AssumeRoleWithSAMLCommand.js +39 -0
- package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +39 -0
- package/dist-es/commands/DecodeAuthorizationMessageCommand.js +41 -0
- package/dist-es/commands/GetAccessKeyInfoCommand.js +41 -0
- package/{dist/es → dist-es}/commands/GetCallerIdentityCommand.js +4 -39
- package/dist-es/commands/GetFederationTokenCommand.js +41 -0
- package/dist-es/commands/GetSessionTokenCommand.js +41 -0
- package/dist-es/defaultRoleAssumers.js +16 -0
- package/{dist/es → dist-es}/defaultStsRoleAssumers.js +10 -32
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -88
- package/{dist/es → dist-es}/protocols/Aws_query.js +152 -155
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
- package/{dist/types → dist-types}/STS.d.ts +2 -2
- package/{dist/types → dist-types}/STSClient.d.ts +8 -8
- package/{dist/types → dist-types}/commands/AssumeRoleCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/AssumeRoleWithSAMLCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DecodeAuthorizationMessageCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetAccessKeyInfoCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetCallerIdentityCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetFederationTokenCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetSessionTokenCommand.d.ts +3 -3
- package/{dist/types → dist-types}/defaultRoleAssumers.d.ts +0 -0
- package/{dist/types → dist-types}/defaultStsRoleAssumers.d.ts +0 -0
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/protocols/Aws_query.d.ts +2 -2
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/dist-types/ts3.4/STS.d.ts +45 -0
- package/{dist/types → dist-types}/ts3.4/STSClient.d.ts +32 -101
- package/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts +17 -0
- package/dist-types/ts3.4/defaultRoleAssumers.d.ts +8 -0
- package/{dist/types → dist-types}/ts3.4/defaultStsRoleAssumers.d.ts +6 -25
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/dist-types/ts3.4/models/models_0.d.ts +367 -0
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_query.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +52 -49
- package/STS.ts +0 -896
- package/STSClient.ts +0 -263
- package/commands/AssumeRoleCommand.ts +0 -176
- package/commands/AssumeRoleWithSAMLCommand.ts +0 -225
- package/commands/AssumeRoleWithWebIdentityCommand.ts +0 -232
- package/commands/DecodeAuthorizationMessageCommand.ts +0 -134
- package/commands/GetAccessKeyInfoCommand.ts +0 -113
- package/commands/GetCallerIdentityCommand.ts +0 -105
- package/commands/GetFederationTokenCommand.ts +0 -234
- package/commands/GetSessionTokenCommand.ts +0 -147
- package/defaultRoleAssumers.spec.ts +0 -148
- package/defaultRoleAssumers.ts +0 -41
- package/defaultStsRoleAssumers.ts +0 -126
- package/dist/cjs/STS.js.map +0 -1
- package/dist/cjs/STSClient.js +0 -47
- package/dist/cjs/STSClient.js.map +0 -1
- package/dist/cjs/commands/AssumeRoleCommand.js +0 -146
- package/dist/cjs/commands/AssumeRoleCommand.js.map +0 -1
- package/dist/cjs/commands/AssumeRoleWithSAMLCommand.js +0 -192
- package/dist/cjs/commands/AssumeRoleWithSAMLCommand.js.map +0 -1
- package/dist/cjs/commands/AssumeRoleWithWebIdentityCommand.js +0 -196
- package/dist/cjs/commands/AssumeRoleWithWebIdentityCommand.js.map +0 -1
- package/dist/cjs/commands/DecodeAuthorizationMessageCommand.js +0 -98
- package/dist/cjs/commands/DecodeAuthorizationMessageCommand.js.map +0 -1
- package/dist/cjs/commands/GetAccessKeyInfoCommand.js +0 -80
- package/dist/cjs/commands/GetAccessKeyInfoCommand.js.map +0 -1
- package/dist/cjs/commands/GetCallerIdentityCommand.js +0 -72
- package/dist/cjs/commands/GetCallerIdentityCommand.js.map +0 -1
- package/dist/cjs/commands/GetFederationTokenCommand.js +0 -201
- package/dist/cjs/commands/GetFederationTokenCommand.js.map +0 -1
- package/dist/cjs/commands/GetSessionTokenCommand.js +0 -114
- package/dist/cjs/commands/GetSessionTokenCommand.js.map +0 -1
- package/dist/cjs/defaultRoleAssumers.js.map +0 -1
- package/dist/cjs/defaultRoleAssumers.spec.js +0 -135
- package/dist/cjs/defaultRoleAssumers.spec.js.map +0 -1
- package/dist/cjs/defaultStsRoleAssumers.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -93
- package/dist/cjs/protocols/Aws_query.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/es/STS.js.map +0 -1
- package/dist/es/STSClient.js.map +0 -1
- package/dist/es/commands/AssumeRoleCommand.js +0 -150
- package/dist/es/commands/AssumeRoleCommand.js.map +0 -1
- package/dist/es/commands/AssumeRoleWithSAMLCommand.js +0 -196
- package/dist/es/commands/AssumeRoleWithSAMLCommand.js.map +0 -1
- package/dist/es/commands/AssumeRoleWithWebIdentityCommand.js +0 -200
- package/dist/es/commands/AssumeRoleWithWebIdentityCommand.js.map +0 -1
- package/dist/es/commands/DecodeAuthorizationMessageCommand.js +0 -102
- package/dist/es/commands/DecodeAuthorizationMessageCommand.js.map +0 -1
- package/dist/es/commands/GetAccessKeyInfoCommand.js +0 -84
- package/dist/es/commands/GetAccessKeyInfoCommand.js.map +0 -1
- package/dist/es/commands/GetCallerIdentityCommand.js.map +0 -1
- package/dist/es/commands/GetFederationTokenCommand.js +0 -205
- package/dist/es/commands/GetFederationTokenCommand.js.map +0 -1
- package/dist/es/commands/GetSessionTokenCommand.js +0 -118
- package/dist/es/commands/GetSessionTokenCommand.js.map +0 -1
- package/dist/es/defaultRoleAssumers.js +0 -33
- package/dist/es/defaultRoleAssumers.js.map +0 -1
- package/dist/es/defaultRoleAssumers.spec.js +0 -142
- package/dist/es/defaultRoleAssumers.spec.js.map +0 -1
- package/dist/es/defaultStsRoleAssumers.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -13
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -93
- package/dist/es/protocols/Aws_query.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/dist/types/defaultRoleAssumers.spec.d.ts +0 -1
- package/dist/types/ts3.4/STS.d.ts +0 -666
- package/dist/types/ts3.4/commands/AssumeRoleCommand.d.ts +0 -118
- package/dist/types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +0 -166
- package/dist/types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +0 -170
- package/dist/types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +0 -70
- package/dist/types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +0 -52
- package/dist/types/ts3.4/commands/GetCallerIdentityCommand.d.ts +0 -44
- package/dist/types/ts3.4/commands/GetFederationTokenCommand.d.ts +0 -173
- package/dist/types/ts3.4/commands/GetSessionTokenCommand.d.ts +0 -86
- package/dist/types/ts3.4/defaultRoleAssumers.d.ts +0 -19
- package/dist/types/ts3.4/defaultRoleAssumers.spec.d.ts +0 -1
- package/dist/types/ts3.4/models/models_0.d.ts +0 -1192
- package/endpoints.ts +0 -91
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -1361
- package/protocols/Aws_query.ts +0 -1513
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -12
- package/tsconfig.json +0 -32
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,53 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.36.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.0...v3.36.1) (2021-10-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **clients:** emitDeclarationOnly in tsconfig.types.json ([#2893](https://github.com/aws/aws-sdk-js-v3/issues/2893)) ([6dc3d56](https://github.com/aws/aws-sdk-js-v3/commit/6dc3d56c20809c90cbdc4dd48627eeebc64af99d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.36.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.35.0...v3.36.0) (2021-10-08)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* publish files in dist-* only ([#2873](https://github.com/aws/aws-sdk-js-v3/issues/2873)) ([53b4243](https://github.com/aws/aws-sdk-js-v3/commit/53b4243b066f25ff2412d5f0dea1036054b2df32))
|
|
23
|
+
* **codegen:** ts-ignore packageInfo imports in codegen ([#2875](https://github.com/aws/aws-sdk-js-v3/issues/2875)) ([99d9267](https://github.com/aws/aws-sdk-js-v3/commit/99d926762193e83a354edec6e9de2b0543449704))
|
|
24
|
+
* **tsconfig:** remove sourceMap ([#2867](https://github.com/aws/aws-sdk-js-v3/issues/2867)) ([d25f526](https://github.com/aws/aws-sdk-js-v3/commit/d25f526627a02a2ca28675fecce66c76b6c97966))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [3.35.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.34.0...v3.35.0) (2021-10-04)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **clients:** eslint --fix using esprint ([#2849](https://github.com/aws/aws-sdk-js-v3/issues/2849)) ([94d0a2d](https://github.com/aws/aws-sdk-js-v3/commit/94d0a2d8a0579ee0a742337937ad05735cfbc1ba))
|
|
36
|
+
* **clients:** move source files to 'src' folder ([#2845](https://github.com/aws/aws-sdk-js-v3/issues/2845)) ([e0025cd](https://github.com/aws/aws-sdk-js-v3/commit/e0025cddbba244a41ddf1fd1adb761142e15c22d))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# [3.34.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.33.0...v3.34.0) (2021-09-24)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Features
|
|
46
|
+
|
|
47
|
+
* **clients:** remove comments from transpiled JS files ([#2817](https://github.com/aws/aws-sdk-js-v3/issues/2817)) ([d01420b](https://github.com/aws/aws-sdk-js-v3/commit/d01420b247966c8ec84c1dd0a1b42512ede10c90))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
6
53
|
# [3.33.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.32.0...v3.33.0) (2021-09-21)
|
|
7
54
|
|
|
8
55
|
**Note:** Version bump only for package @aws-sdk/client-sts
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.STS = void 0;
|
|
4
|
-
const STSClient_1 = require("./STSClient");
|
|
5
4
|
const AssumeRoleCommand_1 = require("./commands/AssumeRoleCommand");
|
|
6
5
|
const AssumeRoleWithSAMLCommand_1 = require("./commands/AssumeRoleWithSAMLCommand");
|
|
7
6
|
const AssumeRoleWithWebIdentityCommand_1 = require("./commands/AssumeRoleWithWebIdentityCommand");
|
|
@@ -10,13 +9,7 @@ const GetAccessKeyInfoCommand_1 = require("./commands/GetAccessKeyInfoCommand");
|
|
|
10
9
|
const GetCallerIdentityCommand_1 = require("./commands/GetCallerIdentityCommand");
|
|
11
10
|
const GetFederationTokenCommand_1 = require("./commands/GetFederationTokenCommand");
|
|
12
11
|
const GetSessionTokenCommand_1 = require("./commands/GetSessionTokenCommand");
|
|
13
|
-
|
|
14
|
-
* <fullname>Security Token Service</fullname>
|
|
15
|
-
* <p>Security Token Service (STS) enables you to request temporary, limited-privilege
|
|
16
|
-
* credentials for Identity and Access Management (IAM) users or for users that you
|
|
17
|
-
* authenticate (federated users). This guide provides descriptions of the STS API. For
|
|
18
|
-
* more information about using this service, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html">Temporary Security Credentials</a>.</p>
|
|
19
|
-
*/
|
|
12
|
+
const STSClient_1 = require("./STSClient");
|
|
20
13
|
class STS extends STSClient_1.STSClient {
|
|
21
14
|
assumeRole(args, optionsOrCb, cb) {
|
|
22
15
|
const command = new AssumeRoleCommand_1.AssumeRoleCommand(args);
|
|
@@ -132,4 +125,3 @@ class STS extends STSClient_1.STSClient {
|
|
|
132
125
|
}
|
|
133
126
|
}
|
|
134
127
|
exports.STS = STS;
|
|
135
|
-
//# sourceMappingURL=STS.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STSClient = void 0;
|
|
4
|
+
const config_resolver_1 = require("@aws-sdk/config-resolver");
|
|
5
|
+
const middleware_content_length_1 = require("@aws-sdk/middleware-content-length");
|
|
6
|
+
const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
|
|
7
|
+
const middleware_logger_1 = require("@aws-sdk/middleware-logger");
|
|
8
|
+
const middleware_retry_1 = require("@aws-sdk/middleware-retry");
|
|
9
|
+
const middleware_sdk_sts_1 = require("@aws-sdk/middleware-sdk-sts");
|
|
10
|
+
const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
|
|
11
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
12
|
+
const runtimeConfig_1 = require("./runtimeConfig");
|
|
13
|
+
class STSClient extends smithy_client_1.Client {
|
|
14
|
+
constructor(configuration) {
|
|
15
|
+
const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration);
|
|
16
|
+
const _config_1 = config_resolver_1.resolveRegionConfig(_config_0);
|
|
17
|
+
const _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1);
|
|
18
|
+
const _config_3 = middleware_retry_1.resolveRetryConfig(_config_2);
|
|
19
|
+
const _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3);
|
|
20
|
+
const _config_5 = middleware_sdk_sts_1.resolveStsAuthConfig(_config_4, { stsClientCtor: STSClient });
|
|
21
|
+
const _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5);
|
|
22
|
+
super(_config_6);
|
|
23
|
+
this.config = _config_6;
|
|
24
|
+
this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config));
|
|
25
|
+
this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config));
|
|
26
|
+
this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config));
|
|
27
|
+
this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config));
|
|
28
|
+
this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config));
|
|
29
|
+
}
|
|
30
|
+
destroy() {
|
|
31
|
+
super.destroy();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.STSClient = STSClient;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AssumeRoleCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const Aws_query_1 = require("../protocols/Aws_query");
|
|
9
|
+
class AssumeRoleCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
|
+
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
|
|
17
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
18
|
+
const { logger } = configuration;
|
|
19
|
+
const clientName = "STSClient";
|
|
20
|
+
const commandName = "AssumeRoleCommand";
|
|
21
|
+
const handlerExecutionContext = {
|
|
22
|
+
logger,
|
|
23
|
+
clientName,
|
|
24
|
+
commandName,
|
|
25
|
+
inputFilterSensitiveLog: models_0_1.AssumeRoleRequest.filterSensitiveLog,
|
|
26
|
+
outputFilterSensitiveLog: models_0_1.AssumeRoleResponse.filterSensitiveLog,
|
|
27
|
+
};
|
|
28
|
+
const { requestHandler } = configuration;
|
|
29
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
|
+
}
|
|
31
|
+
serialize(input, context) {
|
|
32
|
+
return Aws_query_1.serializeAws_queryAssumeRoleCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return Aws_query_1.deserializeAws_queryAssumeRoleCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.AssumeRoleCommand = AssumeRoleCommand;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AssumeRoleWithSAMLCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_query_1 = require("../protocols/Aws_query");
|
|
8
|
+
class AssumeRoleWithSAMLCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "STSClient";
|
|
18
|
+
const commandName = "AssumeRoleWithSAMLCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return Aws_query_1.serializeAws_queryAssumeRoleWithSAMLCommand(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return Aws_query_1.deserializeAws_queryAssumeRoleWithSAMLCommand(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AssumeRoleWithWebIdentityCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_query_1 = require("../protocols/Aws_query");
|
|
8
|
+
class AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "STSClient";
|
|
18
|
+
const commandName = "AssumeRoleWithWebIdentityCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return Aws_query_1.serializeAws_queryAssumeRoleWithWebIdentityCommand(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return Aws_query_1.deserializeAws_queryAssumeRoleWithWebIdentityCommand(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DecodeAuthorizationMessageCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const Aws_query_1 = require("../protocols/Aws_query");
|
|
9
|
+
class DecodeAuthorizationMessageCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
|
+
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
|
|
17
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
18
|
+
const { logger } = configuration;
|
|
19
|
+
const clientName = "STSClient";
|
|
20
|
+
const commandName = "DecodeAuthorizationMessageCommand";
|
|
21
|
+
const handlerExecutionContext = {
|
|
22
|
+
logger,
|
|
23
|
+
clientName,
|
|
24
|
+
commandName,
|
|
25
|
+
inputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageRequest.filterSensitiveLog,
|
|
26
|
+
outputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageResponse.filterSensitiveLog,
|
|
27
|
+
};
|
|
28
|
+
const { requestHandler } = configuration;
|
|
29
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
|
+
}
|
|
31
|
+
serialize(input, context) {
|
|
32
|
+
return Aws_query_1.serializeAws_queryDecodeAuthorizationMessageCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return Aws_query_1.deserializeAws_queryDecodeAuthorizationMessageCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.DecodeAuthorizationMessageCommand = DecodeAuthorizationMessageCommand;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetAccessKeyInfoCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const Aws_query_1 = require("../protocols/Aws_query");
|
|
9
|
+
class GetAccessKeyInfoCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
|
+
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
|
|
17
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
18
|
+
const { logger } = configuration;
|
|
19
|
+
const clientName = "STSClient";
|
|
20
|
+
const commandName = "GetAccessKeyInfoCommand";
|
|
21
|
+
const handlerExecutionContext = {
|
|
22
|
+
logger,
|
|
23
|
+
clientName,
|
|
24
|
+
commandName,
|
|
25
|
+
inputFilterSensitiveLog: models_0_1.GetAccessKeyInfoRequest.filterSensitiveLog,
|
|
26
|
+
outputFilterSensitiveLog: models_0_1.GetAccessKeyInfoResponse.filterSensitiveLog,
|
|
27
|
+
};
|
|
28
|
+
const { requestHandler } = configuration;
|
|
29
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
|
+
}
|
|
31
|
+
serialize(input, context) {
|
|
32
|
+
return Aws_query_1.serializeAws_queryGetAccessKeyInfoCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return Aws_query_1.deserializeAws_queryGetAccessKeyInfoCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.GetAccessKeyInfoCommand = GetAccessKeyInfoCommand;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetCallerIdentityCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const Aws_query_1 = require("../protocols/Aws_query");
|
|
9
|
+
class GetCallerIdentityCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
|
+
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
|
|
17
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
18
|
+
const { logger } = configuration;
|
|
19
|
+
const clientName = "STSClient";
|
|
20
|
+
const commandName = "GetCallerIdentityCommand";
|
|
21
|
+
const handlerExecutionContext = {
|
|
22
|
+
logger,
|
|
23
|
+
clientName,
|
|
24
|
+
commandName,
|
|
25
|
+
inputFilterSensitiveLog: models_0_1.GetCallerIdentityRequest.filterSensitiveLog,
|
|
26
|
+
outputFilterSensitiveLog: models_0_1.GetCallerIdentityResponse.filterSensitiveLog,
|
|
27
|
+
};
|
|
28
|
+
const { requestHandler } = configuration;
|
|
29
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
|
+
}
|
|
31
|
+
serialize(input, context) {
|
|
32
|
+
return Aws_query_1.serializeAws_queryGetCallerIdentityCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return Aws_query_1.deserializeAws_queryGetCallerIdentityCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.GetCallerIdentityCommand = GetCallerIdentityCommand;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetFederationTokenCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const Aws_query_1 = require("../protocols/Aws_query");
|
|
9
|
+
class GetFederationTokenCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
|
+
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
|
|
17
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
18
|
+
const { logger } = configuration;
|
|
19
|
+
const clientName = "STSClient";
|
|
20
|
+
const commandName = "GetFederationTokenCommand";
|
|
21
|
+
const handlerExecutionContext = {
|
|
22
|
+
logger,
|
|
23
|
+
clientName,
|
|
24
|
+
commandName,
|
|
25
|
+
inputFilterSensitiveLog: models_0_1.GetFederationTokenRequest.filterSensitiveLog,
|
|
26
|
+
outputFilterSensitiveLog: models_0_1.GetFederationTokenResponse.filterSensitiveLog,
|
|
27
|
+
};
|
|
28
|
+
const { requestHandler } = configuration;
|
|
29
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
|
+
}
|
|
31
|
+
serialize(input, context) {
|
|
32
|
+
return Aws_query_1.serializeAws_queryGetFederationTokenCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return Aws_query_1.deserializeAws_queryGetFederationTokenCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.GetFederationTokenCommand = GetFederationTokenCommand;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSessionTokenCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const Aws_query_1 = require("../protocols/Aws_query");
|
|
9
|
+
class GetSessionTokenCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
|
+
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
|
|
17
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
18
|
+
const { logger } = configuration;
|
|
19
|
+
const clientName = "STSClient";
|
|
20
|
+
const commandName = "GetSessionTokenCommand";
|
|
21
|
+
const handlerExecutionContext = {
|
|
22
|
+
logger,
|
|
23
|
+
clientName,
|
|
24
|
+
commandName,
|
|
25
|
+
inputFilterSensitiveLog: models_0_1.GetSessionTokenRequest.filterSensitiveLog,
|
|
26
|
+
outputFilterSensitiveLog: models_0_1.GetSessionTokenResponse.filterSensitiveLog,
|
|
27
|
+
};
|
|
28
|
+
const { requestHandler } = configuration;
|
|
29
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
|
+
}
|
|
31
|
+
serialize(input, context) {
|
|
32
|
+
return Aws_query_1.serializeAws_queryGetSessionTokenCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return Aws_query_1.deserializeAws_queryGetSessionTokenCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.GetSessionTokenCommand = GetSessionTokenCommand;
|
|
@@ -1,32 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0;
|
|
4
|
-
// Please do not touch this file. It's generated from template in:
|
|
5
|
-
// https://github.com/aws/aws-sdk-js-v3/blob/main/codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen/sts-client-defaultRoleAssumers.ts
|
|
6
4
|
const defaultStsRoleAssumers_1 = require("./defaultStsRoleAssumers");
|
|
7
5
|
const STSClient_1 = require("./STSClient");
|
|
8
|
-
/**
|
|
9
|
-
* The default role assumer that used by credential providers when sts:AssumeRole API is needed.
|
|
10
|
-
*/
|
|
11
6
|
const getDefaultRoleAssumer = (stsOptions = {}) => defaultStsRoleAssumers_1.getDefaultRoleAssumer(stsOptions, STSClient_1.STSClient);
|
|
12
7
|
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
|
13
|
-
/**
|
|
14
|
-
* The default role assumer that used by credential providers when sts:AssumeRoleWithWebIdentity API is needed.
|
|
15
|
-
*/
|
|
16
8
|
const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}) => defaultStsRoleAssumers_1.getDefaultRoleAssumerWithWebIdentity(stsOptions, STSClient_1.STSClient);
|
|
17
9
|
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
|
18
|
-
/**
|
|
19
|
-
* The default credential providers depend STS client to assume role with desired API: sts:assumeRole,
|
|
20
|
-
* sts:assumeRoleWithWebIdentity, etc. This function decorates the default credential provider with role assumers which
|
|
21
|
-
* encapsulates the process of calling STS commands. This can only be imported by AWS client packages to avoid circular
|
|
22
|
-
* dependencies.
|
|
23
|
-
*
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
10
|
const decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
|
27
11
|
roleAssumer: exports.getDefaultRoleAssumer(input),
|
|
28
12
|
roleAssumerWithWebIdentity: exports.getDefaultRoleAssumerWithWebIdentity(input),
|
|
29
13
|
...input,
|
|
30
14
|
});
|
|
31
15
|
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
|
|
32
|
-
//# sourceMappingURL=defaultRoleAssumers.js.map
|
|
@@ -4,9 +4,6 @@ exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWeb
|
|
|
4
4
|
const AssumeRoleCommand_1 = require("./commands/AssumeRoleCommand");
|
|
5
5
|
const AssumeRoleWithWebIdentityCommand_1 = require("./commands/AssumeRoleWithWebIdentityCommand");
|
|
6
6
|
const ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
|
|
7
|
-
/**
|
|
8
|
-
* Inject the fallback STS region of us-east-1.
|
|
9
|
-
*/
|
|
10
7
|
const decorateDefaultRegion = (region) => {
|
|
11
8
|
if (typeof region !== "function") {
|
|
12
9
|
return region === undefined ? ASSUME_ROLE_DEFAULT_REGION : region;
|
|
@@ -20,10 +17,6 @@ const decorateDefaultRegion = (region) => {
|
|
|
20
17
|
}
|
|
21
18
|
};
|
|
22
19
|
};
|
|
23
|
-
/**
|
|
24
|
-
* The default role assumer that used by credential providers when sts:AssumeRole API is needed.
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
20
|
const getDefaultRoleAssumer = (stsOptions, stsClientCtor) => {
|
|
28
21
|
let stsClient;
|
|
29
22
|
let closureSourceCreds;
|
|
@@ -33,7 +26,6 @@ const getDefaultRoleAssumer = (stsOptions, stsClientCtor) => {
|
|
|
33
26
|
const { logger, region, requestHandler } = stsOptions;
|
|
34
27
|
stsClient = new stsClientCtor({
|
|
35
28
|
logger,
|
|
36
|
-
// A hack to make sts client uses the credential in current closure.
|
|
37
29
|
credentialDefaultProvider: () => async () => closureSourceCreds,
|
|
38
30
|
region: decorateDefaultRegion(region || stsOptions.region),
|
|
39
31
|
...(requestHandler ? { requestHandler } : {}),
|
|
@@ -52,10 +44,6 @@ const getDefaultRoleAssumer = (stsOptions, stsClientCtor) => {
|
|
|
52
44
|
};
|
|
53
45
|
};
|
|
54
46
|
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
|
55
|
-
/**
|
|
56
|
-
* The default role assumer that used by credential providers when sts:AssumeRoleWithWebIdentity API is needed.
|
|
57
|
-
* @internal
|
|
58
|
-
*/
|
|
59
47
|
const getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor) => {
|
|
60
48
|
let stsClient;
|
|
61
49
|
return async (params) => {
|
|
@@ -80,18 +68,9 @@ const getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor) => {
|
|
|
80
68
|
};
|
|
81
69
|
};
|
|
82
70
|
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
|
83
|
-
/**
|
|
84
|
-
* The default credential providers depend STS client to assume role with desired API: sts:assumeRole,
|
|
85
|
-
* sts:assumeRoleWithWebIdentity, etc. This function decorates the default credential provider with role assumers which
|
|
86
|
-
* encapsulates the process of calling STS commands. This can only be imported by AWS client packages to avoid circular
|
|
87
|
-
* dependencies.
|
|
88
|
-
*
|
|
89
|
-
* @internal
|
|
90
|
-
*/
|
|
91
71
|
const decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
|
92
72
|
roleAssumer: exports.getDefaultRoleAssumer(input, input.stsClientCtor),
|
|
93
73
|
roleAssumerWithWebIdentity: exports.getDefaultRoleAssumerWithWebIdentity(input, input.stsClientCtor),
|
|
94
74
|
...input,
|
|
95
75
|
});
|
|
96
76
|
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
|
|
97
|
-
//# sourceMappingURL=defaultStsRoleAssumers.js.map
|
|
@@ -13,4 +13,3 @@ tslib_1.__exportStar(require("./commands/GetFederationTokenCommand"), exports);
|
|
|
13
13
|
tslib_1.__exportStar(require("./commands/GetSessionTokenCommand"), exports);
|
|
14
14
|
tslib_1.__exportStar(require("./defaultRoleAssumers"), exports);
|
|
15
15
|
tslib_1.__exportStar(require("./models/index"), exports);
|
|
16
|
-
//# sourceMappingURL=index.js.map
|