include node_modules so release .zip is deployable
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.STS = void 0;
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
const AssumeRoleCommand_1 = require("./commands/AssumeRoleCommand");
|
||||
const AssumeRoleWithSAMLCommand_1 = require("./commands/AssumeRoleWithSAMLCommand");
|
||||
const AssumeRoleWithWebIdentityCommand_1 = require("./commands/AssumeRoleWithWebIdentityCommand");
|
||||
const DecodeAuthorizationMessageCommand_1 = require("./commands/DecodeAuthorizationMessageCommand");
|
||||
const GetAccessKeyInfoCommand_1 = require("./commands/GetAccessKeyInfoCommand");
|
||||
const GetCallerIdentityCommand_1 = require("./commands/GetCallerIdentityCommand");
|
||||
const GetFederationTokenCommand_1 = require("./commands/GetFederationTokenCommand");
|
||||
const GetSessionTokenCommand_1 = require("./commands/GetSessionTokenCommand");
|
||||
const STSClient_1 = require("./STSClient");
|
||||
const commands = {
|
||||
AssumeRoleCommand: AssumeRoleCommand_1.AssumeRoleCommand,
|
||||
AssumeRoleWithSAMLCommand: AssumeRoleWithSAMLCommand_1.AssumeRoleWithSAMLCommand,
|
||||
AssumeRoleWithWebIdentityCommand: AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand,
|
||||
DecodeAuthorizationMessageCommand: DecodeAuthorizationMessageCommand_1.DecodeAuthorizationMessageCommand,
|
||||
GetAccessKeyInfoCommand: GetAccessKeyInfoCommand_1.GetAccessKeyInfoCommand,
|
||||
GetCallerIdentityCommand: GetCallerIdentityCommand_1.GetCallerIdentityCommand,
|
||||
GetFederationTokenCommand: GetFederationTokenCommand_1.GetFederationTokenCommand,
|
||||
GetSessionTokenCommand: GetSessionTokenCommand_1.GetSessionTokenCommand,
|
||||
};
|
||||
class STS extends STSClient_1.STSClient {
|
||||
}
|
||||
exports.STS = STS;
|
||||
(0, smithy_client_1.createAggregatedClient)(commands, STS);
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.STSClient = exports.__Client = void 0;
|
||||
const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
|
||||
const middleware_logger_1 = require("@aws-sdk/middleware-logger");
|
||||
const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
|
||||
const middleware_sdk_sts_1 = require("@aws-sdk/middleware-sdk-sts");
|
||||
const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
|
||||
const config_resolver_1 = require("@smithy/config-resolver");
|
||||
const middleware_content_length_1 = require("@smithy/middleware-content-length");
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_retry_1 = require("@smithy/middleware-retry");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
|
||||
const EndpointParameters_1 = require("./endpoint/EndpointParameters");
|
||||
const runtimeConfig_1 = require("./runtimeConfig");
|
||||
const runtimeExtensions_1 = require("./runtimeExtensions");
|
||||
class STSClient extends smithy_client_1.Client {
|
||||
constructor(...[configuration]) {
|
||||
const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
|
||||
const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
|
||||
const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);
|
||||
const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
|
||||
const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);
|
||||
const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
|
||||
const _config_6 = (0, middleware_sdk_sts_1.resolveStsAuthConfig)(_config_5, { stsClientCtor: STSClient });
|
||||
const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6);
|
||||
const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
|
||||
super(_config_8);
|
||||
this.config = _config_8;
|
||||
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
|
||||
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
|
||||
this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
|
||||
this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
|
||||
this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
|
||||
this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
|
||||
}
|
||||
destroy() {
|
||||
super.destroy();
|
||||
}
|
||||
}
|
||||
exports.STSClient = STSClient;
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AssumeRoleCommand = exports.$Command = void 0;
|
||||
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const models_0_1 = require("../models/models_0");
|
||||
const Aws_query_1 = require("../protocols/Aws_query");
|
||||
class AssumeRoleCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleCommand.getEndpointParameterInstructions()));
|
||||
this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "STSClient";
|
||||
const commandName = "AssumeRoleCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: (_) => _,
|
||||
outputFilterSensitiveLog: models_0_1.AssumeRoleResponseFilterSensitiveLog,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "AWSSecurityTokenServiceV20110615",
|
||||
operation: "AssumeRole",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_query_1.se_AssumeRoleCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_query_1.de_AssumeRoleCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.AssumeRoleCommand = AssumeRoleCommand;
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AssumeRoleWithSAMLCommand = exports.$Command = void 0;
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const models_0_1 = require("../models/models_0");
|
||||
const Aws_query_1 = require("../protocols/Aws_query");
|
||||
class AssumeRoleWithSAMLCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleWithSAMLCommand.getEndpointParameterInstructions()));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "STSClient";
|
||||
const commandName = "AssumeRoleWithSAMLCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLRequestFilterSensitiveLog,
|
||||
outputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLResponseFilterSensitiveLog,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "AWSSecurityTokenServiceV20110615",
|
||||
operation: "AssumeRoleWithSAML",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_query_1.se_AssumeRoleWithSAMLCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_query_1.de_AssumeRoleWithSAMLCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand;
|
||||
Generated
Vendored
+53
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AssumeRoleWithWebIdentityCommand = exports.$Command = void 0;
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const models_0_1 = require("../models/models_0");
|
||||
const Aws_query_1 = require("../protocols/Aws_query");
|
||||
class AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleWithWebIdentityCommand.getEndpointParameterInstructions()));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "STSClient";
|
||||
const commandName = "AssumeRoleWithWebIdentityCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityRequestFilterSensitiveLog,
|
||||
outputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityResponseFilterSensitiveLog,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "AWSSecurityTokenServiceV20110615",
|
||||
operation: "AssumeRoleWithWebIdentity",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_query_1.se_AssumeRoleWithWebIdentityCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_query_1.de_AssumeRoleWithWebIdentityCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
|
||||
Generated
Vendored
+54
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DecodeAuthorizationMessageCommand = exports.$Command = void 0;
|
||||
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const Aws_query_1 = require("../protocols/Aws_query");
|
||||
class DecodeAuthorizationMessageCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DecodeAuthorizationMessageCommand.getEndpointParameterInstructions()));
|
||||
this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "STSClient";
|
||||
const commandName = "DecodeAuthorizationMessageCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: (_) => _,
|
||||
outputFilterSensitiveLog: (_) => _,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "AWSSecurityTokenServiceV20110615",
|
||||
operation: "DecodeAuthorizationMessage",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_query_1.se_DecodeAuthorizationMessageCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_query_1.de_DecodeAuthorizationMessageCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.DecodeAuthorizationMessageCommand = DecodeAuthorizationMessageCommand;
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetAccessKeyInfoCommand = exports.$Command = void 0;
|
||||
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const Aws_query_1 = require("../protocols/Aws_query");
|
||||
class GetAccessKeyInfoCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetAccessKeyInfoCommand.getEndpointParameterInstructions()));
|
||||
this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "STSClient";
|
||||
const commandName = "GetAccessKeyInfoCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: (_) => _,
|
||||
outputFilterSensitiveLog: (_) => _,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "AWSSecurityTokenServiceV20110615",
|
||||
operation: "GetAccessKeyInfo",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_query_1.se_GetAccessKeyInfoCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_query_1.de_GetAccessKeyInfoCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.GetAccessKeyInfoCommand = GetAccessKeyInfoCommand;
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetCallerIdentityCommand = exports.$Command = void 0;
|
||||
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const Aws_query_1 = require("../protocols/Aws_query");
|
||||
class GetCallerIdentityCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetCallerIdentityCommand.getEndpointParameterInstructions()));
|
||||
this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "STSClient";
|
||||
const commandName = "GetCallerIdentityCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: (_) => _,
|
||||
outputFilterSensitiveLog: (_) => _,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "AWSSecurityTokenServiceV20110615",
|
||||
operation: "GetCallerIdentity",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_query_1.se_GetCallerIdentityCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_query_1.de_GetCallerIdentityCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.GetCallerIdentityCommand = GetCallerIdentityCommand;
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetFederationTokenCommand = exports.$Command = void 0;
|
||||
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const models_0_1 = require("../models/models_0");
|
||||
const Aws_query_1 = require("../protocols/Aws_query");
|
||||
class GetFederationTokenCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetFederationTokenCommand.getEndpointParameterInstructions()));
|
||||
this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "STSClient";
|
||||
const commandName = "GetFederationTokenCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: (_) => _,
|
||||
outputFilterSensitiveLog: models_0_1.GetFederationTokenResponseFilterSensitiveLog,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "AWSSecurityTokenServiceV20110615",
|
||||
operation: "GetFederationToken",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_query_1.se_GetFederationTokenCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_query_1.de_GetFederationTokenCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.GetFederationTokenCommand = GetFederationTokenCommand;
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetSessionTokenCommand = exports.$Command = void 0;
|
||||
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const models_0_1 = require("../models/models_0");
|
||||
const Aws_query_1 = require("../protocols/Aws_query");
|
||||
class GetSessionTokenCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetSessionTokenCommand.getEndpointParameterInstructions()));
|
||||
this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "STSClient";
|
||||
const commandName = "GetSessionTokenCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: (_) => _,
|
||||
outputFilterSensitiveLog: models_0_1.GetSessionTokenResponseFilterSensitiveLog,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "AWSSecurityTokenServiceV20110615",
|
||||
operation: "GetSessionToken",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_query_1.se_GetSessionTokenCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_query_1.de_GetSessionTokenCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.GetSessionTokenCommand = GetSessionTokenCommand;
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./AssumeRoleCommand"), exports);
|
||||
tslib_1.__exportStar(require("./AssumeRoleWithSAMLCommand"), exports);
|
||||
tslib_1.__exportStar(require("./AssumeRoleWithWebIdentityCommand"), exports);
|
||||
tslib_1.__exportStar(require("./DecodeAuthorizationMessageCommand"), exports);
|
||||
tslib_1.__exportStar(require("./GetAccessKeyInfoCommand"), exports);
|
||||
tslib_1.__exportStar(require("./GetCallerIdentityCommand"), exports);
|
||||
tslib_1.__exportStar(require("./GetFederationTokenCommand"), exports);
|
||||
tslib_1.__exportStar(require("./GetSessionTokenCommand"), exports);
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0;
|
||||
const defaultStsRoleAssumers_1 = require("./defaultStsRoleAssumers");
|
||||
const STSClient_1 = require("./STSClient");
|
||||
const getCustomizableStsClientCtor = (baseCtor, customizations) => {
|
||||
if (!customizations)
|
||||
return baseCtor;
|
||||
else
|
||||
return class CustomizableSTSClient extends baseCtor {
|
||||
constructor(config) {
|
||||
super(config);
|
||||
for (const customization of customizations) {
|
||||
this.middlewareStack.use(customization);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumer)(stsOptions, getCustomizableStsClientCtor(STSClient_1.STSClient, stsPlugins));
|
||||
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
||||
const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumerWithWebIdentity)(stsOptions, getCustomizableStsClientCtor(STSClient_1.STSClient, stsPlugins));
|
||||
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
||||
const decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
||||
roleAssumer: (0, exports.getDefaultRoleAssumer)(input),
|
||||
roleAssumerWithWebIdentity: (0, exports.getDefaultRoleAssumerWithWebIdentity)(input),
|
||||
...input,
|
||||
});
|
||||
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0;
|
||||
const AssumeRoleCommand_1 = require("./commands/AssumeRoleCommand");
|
||||
const AssumeRoleWithWebIdentityCommand_1 = require("./commands/AssumeRoleWithWebIdentityCommand");
|
||||
const ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
|
||||
const decorateDefaultRegion = (region) => {
|
||||
if (typeof region !== "function") {
|
||||
return region === undefined ? ASSUME_ROLE_DEFAULT_REGION : region;
|
||||
}
|
||||
return async () => {
|
||||
try {
|
||||
return await region();
|
||||
}
|
||||
catch (e) {
|
||||
return ASSUME_ROLE_DEFAULT_REGION;
|
||||
}
|
||||
};
|
||||
};
|
||||
const getDefaultRoleAssumer = (stsOptions, stsClientCtor) => {
|
||||
let stsClient;
|
||||
let closureSourceCreds;
|
||||
return async (sourceCreds, params) => {
|
||||
closureSourceCreds = sourceCreds;
|
||||
if (!stsClient) {
|
||||
const { logger, region, requestHandler } = stsOptions;
|
||||
stsClient = new stsClientCtor({
|
||||
logger,
|
||||
credentialDefaultProvider: () => async () => closureSourceCreds,
|
||||
region: decorateDefaultRegion(region || stsOptions.region),
|
||||
...(requestHandler ? { requestHandler } : {}),
|
||||
});
|
||||
}
|
||||
const { Credentials } = await stsClient.send(new AssumeRoleCommand_1.AssumeRoleCommand(params));
|
||||
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
|
||||
throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
|
||||
}
|
||||
return {
|
||||
accessKeyId: Credentials.AccessKeyId,
|
||||
secretAccessKey: Credentials.SecretAccessKey,
|
||||
sessionToken: Credentials.SessionToken,
|
||||
expiration: Credentials.Expiration,
|
||||
};
|
||||
};
|
||||
};
|
||||
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
||||
const getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor) => {
|
||||
let stsClient;
|
||||
return async (params) => {
|
||||
if (!stsClient) {
|
||||
const { logger, region, requestHandler } = stsOptions;
|
||||
stsClient = new stsClientCtor({
|
||||
logger,
|
||||
region: decorateDefaultRegion(region || stsOptions.region),
|
||||
...(requestHandler ? { requestHandler } : {}),
|
||||
});
|
||||
}
|
||||
const { Credentials } = await stsClient.send(new AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand(params));
|
||||
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
|
||||
throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
|
||||
}
|
||||
return {
|
||||
accessKeyId: Credentials.AccessKeyId,
|
||||
secretAccessKey: Credentials.SecretAccessKey,
|
||||
sessionToken: Credentials.SessionToken,
|
||||
expiration: Credentials.Expiration,
|
||||
};
|
||||
};
|
||||
};
|
||||
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
||||
const decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
||||
roleAssumer: (0, exports.getDefaultRoleAssumer)(input, input.stsClientCtor),
|
||||
roleAssumerWithWebIdentity: (0, exports.getDefaultRoleAssumerWithWebIdentity)(input, input.stsClientCtor),
|
||||
...input,
|
||||
});
|
||||
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveClientEndpointParameters = void 0;
|
||||
const resolveClientEndpointParameters = (options) => {
|
||||
return {
|
||||
...options,
|
||||
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
||||
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
||||
useGlobalEndpoint: options.useGlobalEndpoint ?? false,
|
||||
defaultSigningName: "sts",
|
||||
};
|
||||
};
|
||||
exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.defaultEndpointResolver = void 0;
|
||||
const util_endpoints_1 = require("@smithy/util-endpoints");
|
||||
const ruleset_1 = require("./ruleset");
|
||||
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
||||
return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {
|
||||
endpointParams: endpointParams,
|
||||
logger: context.logger,
|
||||
});
|
||||
};
|
||||
exports.defaultEndpointResolver = defaultEndpointResolver;
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ruleSet = void 0;
|
||||
const F = "required", G = "type", H = "fn", I = "argv", J = "ref";
|
||||
const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "String" }, n = { [F]: true, "default": false, [G]: "Boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }, v = {}, w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y];
|
||||
const _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
|
||||
exports.ruleSet = _data;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.STSServiceException = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./STSClient"), exports);
|
||||
tslib_1.__exportStar(require("./STS"), exports);
|
||||
tslib_1.__exportStar(require("./commands"), exports);
|
||||
tslib_1.__exportStar(require("./models"), exports);
|
||||
tslib_1.__exportStar(require("./defaultRoleAssumers"), exports);
|
||||
require("@aws-sdk/util-endpoints");
|
||||
var STSServiceException_1 = require("./models/STSServiceException");
|
||||
Object.defineProperty(exports, "STSServiceException", { enumerable: true, get: function () { return STSServiceException_1.STSServiceException; } });
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.STSServiceException = exports.__ServiceException = void 0;
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
||||
class STSServiceException extends smithy_client_1.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, STSServiceException.prototype);
|
||||
}
|
||||
}
|
||||
exports.STSServiceException = STSServiceException;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./models_0"), exports);
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetSessionTokenResponseFilterSensitiveLog = exports.GetFederationTokenResponseFilterSensitiveLog = exports.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = exports.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = exports.AssumeRoleWithSAMLResponseFilterSensitiveLog = exports.AssumeRoleWithSAMLRequestFilterSensitiveLog = exports.AssumeRoleResponseFilterSensitiveLog = exports.CredentialsFilterSensitiveLog = exports.InvalidAuthorizationMessageException = exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = void 0;
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
const STSServiceException_1 = require("./STSServiceException");
|
||||
class ExpiredTokenException extends STSServiceException_1.STSServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "ExpiredTokenException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "ExpiredTokenException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, ExpiredTokenException.prototype);
|
||||
}
|
||||
}
|
||||
exports.ExpiredTokenException = ExpiredTokenException;
|
||||
class MalformedPolicyDocumentException extends STSServiceException_1.STSServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "MalformedPolicyDocumentException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "MalformedPolicyDocumentException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
|
||||
}
|
||||
}
|
||||
exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException;
|
||||
class PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "PackedPolicyTooLargeException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "PackedPolicyTooLargeException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
|
||||
}
|
||||
}
|
||||
exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException;
|
||||
class RegionDisabledException extends STSServiceException_1.STSServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "RegionDisabledException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "RegionDisabledException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, RegionDisabledException.prototype);
|
||||
}
|
||||
}
|
||||
exports.RegionDisabledException = RegionDisabledException;
|
||||
class IDPRejectedClaimException extends STSServiceException_1.STSServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "IDPRejectedClaimException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "IDPRejectedClaimException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
|
||||
}
|
||||
}
|
||||
exports.IDPRejectedClaimException = IDPRejectedClaimException;
|
||||
class InvalidIdentityTokenException extends STSServiceException_1.STSServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "InvalidIdentityTokenException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "InvalidIdentityTokenException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
|
||||
}
|
||||
}
|
||||
exports.InvalidIdentityTokenException = InvalidIdentityTokenException;
|
||||
class IDPCommunicationErrorException extends STSServiceException_1.STSServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "IDPCommunicationErrorException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "IDPCommunicationErrorException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
|
||||
}
|
||||
}
|
||||
exports.IDPCommunicationErrorException = IDPCommunicationErrorException;
|
||||
class InvalidAuthorizationMessageException extends STSServiceException_1.STSServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "InvalidAuthorizationMessageException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "InvalidAuthorizationMessageException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, InvalidAuthorizationMessageException.prototype);
|
||||
}
|
||||
}
|
||||
exports.InvalidAuthorizationMessageException = InvalidAuthorizationMessageException;
|
||||
const CredentialsFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.SecretAccessKey && { SecretAccessKey: smithy_client_1.SENSITIVE_STRING }),
|
||||
});
|
||||
exports.CredentialsFilterSensitiveLog = CredentialsFilterSensitiveLog;
|
||||
const AssumeRoleResponseFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }),
|
||||
});
|
||||
exports.AssumeRoleResponseFilterSensitiveLog = AssumeRoleResponseFilterSensitiveLog;
|
||||
const AssumeRoleWithSAMLRequestFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.SAMLAssertion && { SAMLAssertion: smithy_client_1.SENSITIVE_STRING }),
|
||||
});
|
||||
exports.AssumeRoleWithSAMLRequestFilterSensitiveLog = AssumeRoleWithSAMLRequestFilterSensitiveLog;
|
||||
const AssumeRoleWithSAMLResponseFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }),
|
||||
});
|
||||
exports.AssumeRoleWithSAMLResponseFilterSensitiveLog = AssumeRoleWithSAMLResponseFilterSensitiveLog;
|
||||
const AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.WebIdentityToken && { WebIdentityToken: smithy_client_1.SENSITIVE_STRING }),
|
||||
});
|
||||
exports.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = AssumeRoleWithWebIdentityRequestFilterSensitiveLog;
|
||||
const AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }),
|
||||
});
|
||||
exports.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = AssumeRoleWithWebIdentityResponseFilterSensitiveLog;
|
||||
const GetFederationTokenResponseFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }),
|
||||
});
|
||||
exports.GetFederationTokenResponseFilterSensitiveLog = GetFederationTokenResponseFilterSensitiveLog;
|
||||
const GetSessionTokenResponseFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }),
|
||||
});
|
||||
exports.GetSessionTokenResponseFilterSensitiveLog = GetSessionTokenResponseFilterSensitiveLog;
|
||||
+1028
File diff suppressed because it is too large
Load Diff
+39
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
||||
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
||||
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
||||
const config_resolver_1 = require("@smithy/config-resolver");
|
||||
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
||||
const invalid_dependency_1 = require("@smithy/invalid-dependency");
|
||||
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
||||
const util_retry_1 = require("@smithy/util-retry");
|
||||
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
|
||||
const getRuntimeConfig = (config) => {
|
||||
const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
return {
|
||||
...clientSharedValues,
|
||||
...config,
|
||||
runtime: "browser",
|
||||
defaultsMode,
|
||||
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
|
||||
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
||||
(0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
||||
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
|
||||
region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
|
||||
requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
|
||||
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
|
||||
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
||||
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
||||
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
||||
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
||||
const defaultStsRoleAssumers_1 = require("./defaultStsRoleAssumers");
|
||||
const core_1 = require("@aws-sdk/core");
|
||||
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
||||
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
||||
const config_resolver_1 = require("@smithy/config-resolver");
|
||||
const hash_node_1 = require("@smithy/hash-node");
|
||||
const middleware_retry_1 = require("@smithy/middleware-retry");
|
||||
const node_config_provider_1 = require("@smithy/node-config-provider");
|
||||
const node_http_handler_1 = require("@smithy/node-http-handler");
|
||||
const util_body_length_node_1 = require("@smithy/util-body-length-node");
|
||||
const util_retry_1 = require("@smithy/util-retry");
|
||||
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
|
||||
const smithy_client_2 = require("@smithy/smithy-client");
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
return {
|
||||
...clientSharedValues,
|
||||
...config,
|
||||
runtime: "node",
|
||||
defaultsMode,
|
||||
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
||||
credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, defaultStsRoleAssumers_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
||||
(0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
||||
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
||||
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
||||
requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
|
||||
retryMode: config?.retryMode ??
|
||||
(0, node_config_provider_1.loadConfig)({
|
||||
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
||||
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
|
||||
}),
|
||||
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
||||
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
||||
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
||||
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
||||
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
||||
const getRuntimeConfig = (config) => {
|
||||
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
|
||||
return {
|
||||
...browserDefaults,
|
||||
...config,
|
||||
runtime: "react-native",
|
||||
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
const url_parser_1 = require("@smithy/url-parser");
|
||||
const util_base64_1 = require("@smithy/util-base64");
|
||||
const util_utf8_1 = require("@smithy/util-utf8");
|
||||
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
||||
const getRuntimeConfig = (config) => {
|
||||
return {
|
||||
apiVersion: "2011-06-15",
|
||||
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
|
||||
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
|
||||
disableHostPrefix: config?.disableHostPrefix ?? false,
|
||||
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
||||
extensions: config?.extensions ?? [],
|
||||
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
||||
serviceId: config?.serviceId ?? "STS",
|
||||
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
||||
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveRuntimeExtensions = void 0;
|
||||
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
||||
const protocol_http_1 = require("@smithy/protocol-http");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
const asPartial = (t) => t;
|
||||
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
||||
const extensionConfiguration = {
|
||||
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
||||
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
||||
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
||||
};
|
||||
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
||||
return {
|
||||
...runtimeConfig,
|
||||
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
||||
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
||||
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
||||
};
|
||||
};
|
||||
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
||||
Reference in New Issue
Block a user