@jjrawlins/cdk-iam-policy-builder-helper 0.0.51 → 0.0.53
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/.jsii +3 -3
- package/cdk-iam-policy-builder-helper/go.mod +1 -1
- package/cdk-iam-policy-builder-helper/jsii/jsii.go +2 -2
- package/cdk-iam-policy-builder-helper/version +1 -1
- package/node_modules/@aws-sdk/client-iam/dist-cjs/index.js +13439 -13574
- package/node_modules/@aws-sdk/client-iam/package.json +5 -5
- package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +478 -596
- package/node_modules/@aws-sdk/client-sso/package.json +4 -4
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +1969 -6
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +48 -88
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +35 -74
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +273 -365
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1581 -1863
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonCodec.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeDeserializer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +2 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlCodec.d.ts +1 -1
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +38 -73
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +194 -259
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +72 -132
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +71 -107
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +176 -249
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-CVy8iqsZ.js +14 -0
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +16 -25
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +170 -203
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +583 -858
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +795 -928
- package/node_modules/@aws-sdk/nested-clients/package.json +4 -4
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +147 -222
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +50 -94
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +5 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +32 -30
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +133 -202
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +126 -34
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +5 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +4 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +3 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +19 -17
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +4 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +5 -6
- package/node_modules/@smithy/core/dist-es/submodules/schema/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +82 -176
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +22 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js +110 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +4 -26
- package/node_modules/@smithy/core/dist-types/submodules/schema/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +5 -24
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/sentinels.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/translateTraits.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +5 -24
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/sentinels.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
- package/node_modules/@smithy/core/package.json +3 -3
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
- package/node_modules/@smithy/middleware-retry/package.json +2 -2
- package/node_modules/@smithy/smithy-client/package.json +4 -4
- package/node_modules/@smithy/util-base64/dist-cjs/constants.browser.js +9 -32
- package/node_modules/@smithy/util-base64/dist-es/constants.browser.js +9 -28
- package/node_modules/@smithy/util-base64/dist-types/constants.browser.d.ts +5 -6
- package/node_modules/@smithy/util-base64/dist-types/ts3.4/constants.browser.d.ts +5 -6
- package/node_modules/@smithy/util-base64/package.json +1 -1
- package/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +8 -6
- package/node_modules/@smithy/util-body-length-node/dist-es/calculateBodyLength.js +8 -6
- package/node_modules/@smithy/util-body-length-node/package.json +1 -1
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js +11 -9
- package/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js +11 -8
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -3
- package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
- package/node_modules/@smithy/util-stream/dist-cjs/index.js +3 -5
- package/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js +3 -5
- package/node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
- package/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
- package/node_modules/@smithy/util-stream/package.json +3 -3
- package/package.json +3 -3
|
@@ -1,899 +1,624 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/submodules/sso-oidc/index.ts
|
|
22
|
-
var index_exports = {};
|
|
23
|
-
__export(index_exports, {
|
|
24
|
-
$Command: () => import_smithy_client6.Command,
|
|
25
|
-
AccessDeniedException: () => AccessDeniedException,
|
|
26
|
-
AccessDeniedExceptionReason: () => AccessDeniedExceptionReason,
|
|
27
|
-
AuthorizationPendingException: () => AuthorizationPendingException,
|
|
28
|
-
CreateTokenCommand: () => CreateTokenCommand,
|
|
29
|
-
CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog,
|
|
30
|
-
CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog,
|
|
31
|
-
ExpiredTokenException: () => ExpiredTokenException,
|
|
32
|
-
InternalServerException: () => InternalServerException,
|
|
33
|
-
InvalidClientException: () => InvalidClientException,
|
|
34
|
-
InvalidGrantException: () => InvalidGrantException,
|
|
35
|
-
InvalidRequestException: () => InvalidRequestException,
|
|
36
|
-
InvalidRequestExceptionReason: () => InvalidRequestExceptionReason,
|
|
37
|
-
InvalidScopeException: () => InvalidScopeException,
|
|
38
|
-
SSOOIDC: () => SSOOIDC,
|
|
39
|
-
SSOOIDCClient: () => SSOOIDCClient,
|
|
40
|
-
SSOOIDCServiceException: () => SSOOIDCServiceException,
|
|
41
|
-
SlowDownException: () => SlowDownException,
|
|
42
|
-
UnauthorizedClientException: () => UnauthorizedClientException,
|
|
43
|
-
UnsupportedGrantTypeException: () => UnsupportedGrantTypeException,
|
|
44
|
-
__Client: () => import_smithy_client2.Client
|
|
45
|
-
});
|
|
46
|
-
module.exports = __toCommonJS(index_exports);
|
|
1
|
+
'use strict';
|
|
47
2
|
|
|
48
|
-
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
3
|
+
var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
|
|
4
|
+
var middlewareLogger = require('@aws-sdk/middleware-logger');
|
|
5
|
+
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
|
|
6
|
+
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
|
+
var configResolver = require('@smithy/config-resolver');
|
|
8
|
+
var core = require('@smithy/core');
|
|
9
|
+
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
10
|
+
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
11
|
+
var middlewareRetry = require('@smithy/middleware-retry');
|
|
12
|
+
var smithyClient = require('@smithy/smithy-client');
|
|
13
|
+
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
14
|
+
var runtimeConfig = require('./runtimeConfig');
|
|
15
|
+
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
16
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
17
|
+
var middlewareSerde = require('@smithy/middleware-serde');
|
|
18
|
+
var core$1 = require('@aws-sdk/core');
|
|
60
19
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
20
|
+
const resolveClientEndpointParameters = (options) => {
|
|
21
|
+
return Object.assign(options, {
|
|
22
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
23
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
24
|
+
defaultSigningName: "sso-oauth",
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
const commonParams = {
|
|
28
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
29
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
30
|
+
Region: { type: "builtInParams", name: "region" },
|
|
31
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
74
32
|
};
|
|
75
33
|
|
|
76
|
-
|
|
77
|
-
|
|
34
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
35
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
36
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
37
|
+
let _credentials = runtimeConfig.credentials;
|
|
38
|
+
return {
|
|
39
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
40
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
41
|
+
if (index === -1) {
|
|
42
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
httpAuthSchemes() {
|
|
49
|
+
return _httpAuthSchemes;
|
|
50
|
+
},
|
|
51
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
52
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
53
|
+
},
|
|
54
|
+
httpAuthSchemeProvider() {
|
|
55
|
+
return _httpAuthSchemeProvider;
|
|
56
|
+
},
|
|
57
|
+
setCredentials(credentials) {
|
|
58
|
+
_credentials = credentials;
|
|
59
|
+
},
|
|
60
|
+
credentials() {
|
|
61
|
+
return _credentials;
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
66
|
+
return {
|
|
67
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
68
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
69
|
+
credentials: config.credentials(),
|
|
70
|
+
};
|
|
71
|
+
};
|
|
78
72
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
74
|
+
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
75
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
76
|
+
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
77
|
+
};
|
|
83
78
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
79
|
+
class SSOOIDCClient extends smithyClient.Client {
|
|
80
|
+
config;
|
|
81
|
+
constructor(...[configuration]) {
|
|
82
|
+
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
|
83
|
+
super(_config_0);
|
|
84
|
+
this.initConfig = _config_0;
|
|
85
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
86
|
+
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
87
|
+
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
|
|
88
|
+
const _config_4 = configResolver.resolveRegionConfig(_config_3);
|
|
89
|
+
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
90
|
+
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
|
|
91
|
+
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
92
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
93
|
+
this.config = _config_8;
|
|
94
|
+
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
95
|
+
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
96
|
+
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
97
|
+
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
98
|
+
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
100
|
+
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
101
|
+
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider,
|
|
102
|
+
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
103
|
+
"aws.auth#sigv4": config.credentials,
|
|
104
|
+
}),
|
|
105
|
+
}));
|
|
106
|
+
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
112
107
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
118
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
119
|
-
credentials: config.credentials()
|
|
120
|
-
};
|
|
121
|
-
}, "resolveHttpAuthRuntimeConfig");
|
|
108
|
+
destroy() {
|
|
109
|
+
super.destroy();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
122
112
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
getHttpAuthExtensionConfiguration(runtimeConfig)
|
|
130
|
-
);
|
|
131
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
132
|
-
return Object.assign(
|
|
133
|
-
runtimeConfig,
|
|
134
|
-
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
135
|
-
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
136
|
-
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
137
|
-
resolveHttpAuthRuntimeConfig(extensionConfiguration)
|
|
138
|
-
);
|
|
139
|
-
}, "resolveRuntimeExtensions");
|
|
113
|
+
class SSOOIDCServiceException extends smithyClient.ServiceException {
|
|
114
|
+
constructor(options) {
|
|
115
|
+
super(options);
|
|
116
|
+
Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
140
119
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
static {
|
|
144
|
-
__name(this, "SSOOIDCClient");
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* The resolved configuration of SSOOIDCClient class. This is resolved and normalized from the {@link SSOOIDCClientConfig | constructor configuration interface}.
|
|
148
|
-
*/
|
|
149
|
-
config;
|
|
150
|
-
constructor(...[configuration]) {
|
|
151
|
-
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
152
|
-
super(_config_0);
|
|
153
|
-
this.initConfig = _config_0;
|
|
154
|
-
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
155
|
-
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
|
|
156
|
-
const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
|
|
157
|
-
const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
|
|
158
|
-
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
159
|
-
const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
|
|
160
|
-
const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
|
|
161
|
-
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
162
|
-
this.config = _config_8;
|
|
163
|
-
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
164
|
-
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
165
|
-
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
166
|
-
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
167
|
-
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
168
|
-
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
169
|
-
this.middlewareStack.use(
|
|
170
|
-
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
171
|
-
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider,
|
|
172
|
-
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
|
|
173
|
-
"aws.auth#sigv4": config.credentials
|
|
174
|
-
}), "identityProviderConfigProvider")
|
|
175
|
-
})
|
|
176
|
-
);
|
|
177
|
-
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
181
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
182
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
183
|
-
*/
|
|
184
|
-
destroy() {
|
|
185
|
-
super.destroy();
|
|
186
|
-
}
|
|
120
|
+
const AccessDeniedExceptionReason = {
|
|
121
|
+
KMS_ACCESS_DENIED: "KMS_AccessDeniedException",
|
|
187
122
|
};
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
123
|
+
class AccessDeniedException extends SSOOIDCServiceException {
|
|
124
|
+
name = "AccessDeniedException";
|
|
125
|
+
$fault = "client";
|
|
126
|
+
error;
|
|
127
|
+
reason;
|
|
128
|
+
error_description;
|
|
129
|
+
constructor(opts) {
|
|
130
|
+
super({
|
|
131
|
+
name: "AccessDeniedException",
|
|
132
|
+
$fault: "client",
|
|
133
|
+
...opts,
|
|
134
|
+
});
|
|
135
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
136
|
+
this.error = opts.error;
|
|
137
|
+
this.reason = opts.reason;
|
|
138
|
+
this.error_description = opts.error_description;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
class AuthorizationPendingException extends SSOOIDCServiceException {
|
|
142
|
+
name = "AuthorizationPendingException";
|
|
143
|
+
$fault = "client";
|
|
144
|
+
error;
|
|
145
|
+
error_description;
|
|
146
|
+
constructor(opts) {
|
|
147
|
+
super({
|
|
148
|
+
name: "AuthorizationPendingException",
|
|
149
|
+
$fault: "client",
|
|
150
|
+
...opts,
|
|
151
|
+
});
|
|
152
|
+
Object.setPrototypeOf(this, AuthorizationPendingException.prototype);
|
|
153
|
+
this.error = opts.error;
|
|
154
|
+
this.error_description = opts.error_description;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const CreateTokenRequestFilterSensitiveLog = (obj) => ({
|
|
158
|
+
...obj,
|
|
159
|
+
...(obj.clientSecret && { clientSecret: smithyClient.SENSITIVE_STRING }),
|
|
160
|
+
...(obj.refreshToken && { refreshToken: smithyClient.SENSITIVE_STRING }),
|
|
161
|
+
...(obj.codeVerifier && { codeVerifier: smithyClient.SENSITIVE_STRING }),
|
|
162
|
+
});
|
|
163
|
+
const CreateTokenResponseFilterSensitiveLog = (obj) => ({
|
|
164
|
+
...obj,
|
|
165
|
+
...(obj.accessToken && { accessToken: smithyClient.SENSITIVE_STRING }),
|
|
166
|
+
...(obj.refreshToken && { refreshToken: smithyClient.SENSITIVE_STRING }),
|
|
167
|
+
...(obj.idToken && { idToken: smithyClient.SENSITIVE_STRING }),
|
|
168
|
+
});
|
|
169
|
+
class ExpiredTokenException extends SSOOIDCServiceException {
|
|
170
|
+
name = "ExpiredTokenException";
|
|
171
|
+
$fault = "client";
|
|
172
|
+
error;
|
|
173
|
+
error_description;
|
|
174
|
+
constructor(opts) {
|
|
175
|
+
super({
|
|
176
|
+
name: "ExpiredTokenException",
|
|
177
|
+
$fault: "client",
|
|
178
|
+
...opts,
|
|
179
|
+
});
|
|
180
|
+
Object.setPrototypeOf(this, ExpiredTokenException.prototype);
|
|
181
|
+
this.error = opts.error;
|
|
182
|
+
this.error_description = opts.error_description;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
class InternalServerException extends SSOOIDCServiceException {
|
|
186
|
+
name = "InternalServerException";
|
|
187
|
+
$fault = "server";
|
|
188
|
+
error;
|
|
189
|
+
error_description;
|
|
190
|
+
constructor(opts) {
|
|
191
|
+
super({
|
|
192
|
+
name: "InternalServerException",
|
|
193
|
+
$fault: "server",
|
|
194
|
+
...opts,
|
|
195
|
+
});
|
|
196
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
197
|
+
this.error = opts.error;
|
|
198
|
+
this.error_description = opts.error_description;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
class InvalidClientException extends SSOOIDCServiceException {
|
|
202
|
+
name = "InvalidClientException";
|
|
203
|
+
$fault = "client";
|
|
204
|
+
error;
|
|
205
|
+
error_description;
|
|
206
|
+
constructor(opts) {
|
|
207
|
+
super({
|
|
208
|
+
name: "InvalidClientException",
|
|
209
|
+
$fault: "client",
|
|
210
|
+
...opts,
|
|
211
|
+
});
|
|
212
|
+
Object.setPrototypeOf(this, InvalidClientException.prototype);
|
|
213
|
+
this.error = opts.error;
|
|
214
|
+
this.error_description = opts.error_description;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
class InvalidGrantException extends SSOOIDCServiceException {
|
|
218
|
+
name = "InvalidGrantException";
|
|
219
|
+
$fault = "client";
|
|
220
|
+
error;
|
|
221
|
+
error_description;
|
|
222
|
+
constructor(opts) {
|
|
223
|
+
super({
|
|
224
|
+
name: "InvalidGrantException",
|
|
225
|
+
$fault: "client",
|
|
226
|
+
...opts,
|
|
227
|
+
});
|
|
228
|
+
Object.setPrototypeOf(this, InvalidGrantException.prototype);
|
|
229
|
+
this.error = opts.error;
|
|
230
|
+
this.error_description = opts.error_description;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const InvalidRequestExceptionReason = {
|
|
234
|
+
KMS_DISABLED_KEY: "KMS_DisabledException",
|
|
235
|
+
KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException",
|
|
236
|
+
KMS_INVALID_STATE: "KMS_InvalidStateException",
|
|
237
|
+
KMS_KEY_NOT_FOUND: "KMS_NotFoundException",
|
|
213
238
|
};
|
|
239
|
+
class InvalidRequestException extends SSOOIDCServiceException {
|
|
240
|
+
name = "InvalidRequestException";
|
|
241
|
+
$fault = "client";
|
|
242
|
+
error;
|
|
243
|
+
reason;
|
|
244
|
+
error_description;
|
|
245
|
+
constructor(opts) {
|
|
246
|
+
super({
|
|
247
|
+
name: "InvalidRequestException",
|
|
248
|
+
$fault: "client",
|
|
249
|
+
...opts,
|
|
250
|
+
});
|
|
251
|
+
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
|
252
|
+
this.error = opts.error;
|
|
253
|
+
this.reason = opts.reason;
|
|
254
|
+
this.error_description = opts.error_description;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
class InvalidScopeException extends SSOOIDCServiceException {
|
|
258
|
+
name = "InvalidScopeException";
|
|
259
|
+
$fault = "client";
|
|
260
|
+
error;
|
|
261
|
+
error_description;
|
|
262
|
+
constructor(opts) {
|
|
263
|
+
super({
|
|
264
|
+
name: "InvalidScopeException",
|
|
265
|
+
$fault: "client",
|
|
266
|
+
...opts,
|
|
267
|
+
});
|
|
268
|
+
Object.setPrototypeOf(this, InvalidScopeException.prototype);
|
|
269
|
+
this.error = opts.error;
|
|
270
|
+
this.error_description = opts.error_description;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
class SlowDownException extends SSOOIDCServiceException {
|
|
274
|
+
name = "SlowDownException";
|
|
275
|
+
$fault = "client";
|
|
276
|
+
error;
|
|
277
|
+
error_description;
|
|
278
|
+
constructor(opts) {
|
|
279
|
+
super({
|
|
280
|
+
name: "SlowDownException",
|
|
281
|
+
$fault: "client",
|
|
282
|
+
...opts,
|
|
283
|
+
});
|
|
284
|
+
Object.setPrototypeOf(this, SlowDownException.prototype);
|
|
285
|
+
this.error = opts.error;
|
|
286
|
+
this.error_description = opts.error_description;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
class UnauthorizedClientException extends SSOOIDCServiceException {
|
|
290
|
+
name = "UnauthorizedClientException";
|
|
291
|
+
$fault = "client";
|
|
292
|
+
error;
|
|
293
|
+
error_description;
|
|
294
|
+
constructor(opts) {
|
|
295
|
+
super({
|
|
296
|
+
name: "UnauthorizedClientException",
|
|
297
|
+
$fault: "client",
|
|
298
|
+
...opts,
|
|
299
|
+
});
|
|
300
|
+
Object.setPrototypeOf(this, UnauthorizedClientException.prototype);
|
|
301
|
+
this.error = opts.error;
|
|
302
|
+
this.error_description = opts.error_description;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
class UnsupportedGrantTypeException extends SSOOIDCServiceException {
|
|
306
|
+
name = "UnsupportedGrantTypeException";
|
|
307
|
+
$fault = "client";
|
|
308
|
+
error;
|
|
309
|
+
error_description;
|
|
310
|
+
constructor(opts) {
|
|
311
|
+
super({
|
|
312
|
+
name: "UnsupportedGrantTypeException",
|
|
313
|
+
$fault: "client",
|
|
314
|
+
...opts,
|
|
315
|
+
});
|
|
316
|
+
Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype);
|
|
317
|
+
this.error = opts.error;
|
|
318
|
+
this.error_description = opts.error_description;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
214
321
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
322
|
+
const se_CreateTokenCommand = async (input, context) => {
|
|
323
|
+
const b = core.requestBuilder(input, context);
|
|
324
|
+
const headers = {
|
|
325
|
+
"content-type": "application/json",
|
|
326
|
+
};
|
|
327
|
+
b.bp("/token");
|
|
328
|
+
let body;
|
|
329
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
330
|
+
clientId: [],
|
|
331
|
+
clientSecret: [],
|
|
332
|
+
code: [],
|
|
333
|
+
codeVerifier: [],
|
|
334
|
+
deviceCode: [],
|
|
335
|
+
grantType: [],
|
|
336
|
+
redirectUri: [],
|
|
337
|
+
refreshToken: [],
|
|
338
|
+
scope: (_) => smithyClient._json(_),
|
|
339
|
+
}));
|
|
340
|
+
b.m("POST").h(headers).b(body);
|
|
341
|
+
return b.build();
|
|
218
342
|
};
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
*/
|
|
234
|
-
reason;
|
|
235
|
-
/**
|
|
236
|
-
* <p>Human-readable text providing additional information, used to assist the client developer
|
|
237
|
-
* in understanding the error that occurred.</p>
|
|
238
|
-
* @public
|
|
239
|
-
*/
|
|
240
|
-
error_description;
|
|
241
|
-
/**
|
|
242
|
-
* @internal
|
|
243
|
-
*/
|
|
244
|
-
constructor(opts) {
|
|
245
|
-
super({
|
|
246
|
-
name: "AccessDeniedException",
|
|
247
|
-
$fault: "client",
|
|
248
|
-
...opts
|
|
343
|
+
const de_CreateTokenCommand = async (output, context) => {
|
|
344
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
345
|
+
return de_CommandError(output, context);
|
|
346
|
+
}
|
|
347
|
+
const contents = smithyClient.map({
|
|
348
|
+
$metadata: deserializeMetadata(output),
|
|
349
|
+
});
|
|
350
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
351
|
+
const doc = smithyClient.take(data, {
|
|
352
|
+
accessToken: smithyClient.expectString,
|
|
353
|
+
expiresIn: smithyClient.expectInt32,
|
|
354
|
+
idToken: smithyClient.expectString,
|
|
355
|
+
refreshToken: smithyClient.expectString,
|
|
356
|
+
tokenType: smithyClient.expectString,
|
|
249
357
|
});
|
|
250
|
-
Object.
|
|
251
|
-
|
|
252
|
-
this.reason = opts.reason;
|
|
253
|
-
this.error_description = opts.error_description;
|
|
254
|
-
}
|
|
358
|
+
Object.assign(contents, doc);
|
|
359
|
+
return contents;
|
|
255
360
|
};
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
361
|
+
const de_CommandError = async (output, context) => {
|
|
362
|
+
const parsedOutput = {
|
|
363
|
+
...output,
|
|
364
|
+
body: await core$1.parseJsonErrorBody(output.body, context),
|
|
365
|
+
};
|
|
366
|
+
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
367
|
+
switch (errorCode) {
|
|
368
|
+
case "AccessDeniedException":
|
|
369
|
+
case "com.amazonaws.ssooidc#AccessDeniedException":
|
|
370
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput);
|
|
371
|
+
case "AuthorizationPendingException":
|
|
372
|
+
case "com.amazonaws.ssooidc#AuthorizationPendingException":
|
|
373
|
+
throw await de_AuthorizationPendingExceptionRes(parsedOutput);
|
|
374
|
+
case "ExpiredTokenException":
|
|
375
|
+
case "com.amazonaws.ssooidc#ExpiredTokenException":
|
|
376
|
+
throw await de_ExpiredTokenExceptionRes(parsedOutput);
|
|
377
|
+
case "InternalServerException":
|
|
378
|
+
case "com.amazonaws.ssooidc#InternalServerException":
|
|
379
|
+
throw await de_InternalServerExceptionRes(parsedOutput);
|
|
380
|
+
case "InvalidClientException":
|
|
381
|
+
case "com.amazonaws.ssooidc#InvalidClientException":
|
|
382
|
+
throw await de_InvalidClientExceptionRes(parsedOutput);
|
|
383
|
+
case "InvalidGrantException":
|
|
384
|
+
case "com.amazonaws.ssooidc#InvalidGrantException":
|
|
385
|
+
throw await de_InvalidGrantExceptionRes(parsedOutput);
|
|
386
|
+
case "InvalidRequestException":
|
|
387
|
+
case "com.amazonaws.ssooidc#InvalidRequestException":
|
|
388
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput);
|
|
389
|
+
case "InvalidScopeException":
|
|
390
|
+
case "com.amazonaws.ssooidc#InvalidScopeException":
|
|
391
|
+
throw await de_InvalidScopeExceptionRes(parsedOutput);
|
|
392
|
+
case "SlowDownException":
|
|
393
|
+
case "com.amazonaws.ssooidc#SlowDownException":
|
|
394
|
+
throw await de_SlowDownExceptionRes(parsedOutput);
|
|
395
|
+
case "UnauthorizedClientException":
|
|
396
|
+
case "com.amazonaws.ssooidc#UnauthorizedClientException":
|
|
397
|
+
throw await de_UnauthorizedClientExceptionRes(parsedOutput);
|
|
398
|
+
case "UnsupportedGrantTypeException":
|
|
399
|
+
case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
|
|
400
|
+
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput);
|
|
401
|
+
default:
|
|
402
|
+
const parsedBody = parsedOutput.body;
|
|
403
|
+
return throwDefaultError({
|
|
404
|
+
output,
|
|
405
|
+
parsedBody,
|
|
406
|
+
errorCode,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
const throwDefaultError = smithyClient.withBaseException(SSOOIDCServiceException);
|
|
411
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
412
|
+
const contents = smithyClient.map({});
|
|
413
|
+
const data = parsedOutput.body;
|
|
414
|
+
const doc = smithyClient.take(data, {
|
|
415
|
+
error: smithyClient.expectString,
|
|
416
|
+
error_description: smithyClient.expectString,
|
|
417
|
+
reason: smithyClient.expectString,
|
|
418
|
+
});
|
|
419
|
+
Object.assign(contents, doc);
|
|
420
|
+
const exception = new AccessDeniedException({
|
|
421
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
422
|
+
...contents,
|
|
282
423
|
});
|
|
283
|
-
|
|
284
|
-
this.error = opts.error;
|
|
285
|
-
this.error_description = opts.error_description;
|
|
286
|
-
}
|
|
424
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
287
425
|
};
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
var CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
295
|
-
...obj,
|
|
296
|
-
...obj.accessToken && { accessToken: import_smithy_client4.SENSITIVE_STRING },
|
|
297
|
-
...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING },
|
|
298
|
-
...obj.idToken && { idToken: import_smithy_client4.SENSITIVE_STRING }
|
|
299
|
-
}), "CreateTokenResponseFilterSensitiveLog");
|
|
300
|
-
var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException {
|
|
301
|
-
static {
|
|
302
|
-
__name(this, "ExpiredTokenException");
|
|
303
|
-
}
|
|
304
|
-
name = "ExpiredTokenException";
|
|
305
|
-
$fault = "client";
|
|
306
|
-
/**
|
|
307
|
-
* <p>Single error code. For this exception the value will be <code>expired_token</code>.</p>
|
|
308
|
-
* @public
|
|
309
|
-
*/
|
|
310
|
-
error;
|
|
311
|
-
/**
|
|
312
|
-
* <p>Human-readable text providing additional information, used to assist the client developer
|
|
313
|
-
* in understanding the error that occurred.</p>
|
|
314
|
-
* @public
|
|
315
|
-
*/
|
|
316
|
-
error_description;
|
|
317
|
-
/**
|
|
318
|
-
* @internal
|
|
319
|
-
*/
|
|
320
|
-
constructor(opts) {
|
|
321
|
-
super({
|
|
322
|
-
name: "ExpiredTokenException",
|
|
323
|
-
$fault: "client",
|
|
324
|
-
...opts
|
|
426
|
+
const de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
|
|
427
|
+
const contents = smithyClient.map({});
|
|
428
|
+
const data = parsedOutput.body;
|
|
429
|
+
const doc = smithyClient.take(data, {
|
|
430
|
+
error: smithyClient.expectString,
|
|
431
|
+
error_description: smithyClient.expectString,
|
|
325
432
|
});
|
|
326
|
-
Object.
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
433
|
+
Object.assign(contents, doc);
|
|
434
|
+
const exception = new AuthorizationPendingException({
|
|
435
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
436
|
+
...contents,
|
|
437
|
+
});
|
|
438
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
330
439
|
};
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* <p>Human-readable text providing additional information, used to assist the client developer
|
|
344
|
-
* in understanding the error that occurred.</p>
|
|
345
|
-
* @public
|
|
346
|
-
*/
|
|
347
|
-
error_description;
|
|
348
|
-
/**
|
|
349
|
-
* @internal
|
|
350
|
-
*/
|
|
351
|
-
constructor(opts) {
|
|
352
|
-
super({
|
|
353
|
-
name: "InternalServerException",
|
|
354
|
-
$fault: "server",
|
|
355
|
-
...opts
|
|
440
|
+
const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
|
|
441
|
+
const contents = smithyClient.map({});
|
|
442
|
+
const data = parsedOutput.body;
|
|
443
|
+
const doc = smithyClient.take(data, {
|
|
444
|
+
error: smithyClient.expectString,
|
|
445
|
+
error_description: smithyClient.expectString,
|
|
446
|
+
});
|
|
447
|
+
Object.assign(contents, doc);
|
|
448
|
+
const exception = new ExpiredTokenException({
|
|
449
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
450
|
+
...contents,
|
|
356
451
|
});
|
|
357
|
-
|
|
358
|
-
this.error = opts.error;
|
|
359
|
-
this.error_description = opts.error_description;
|
|
360
|
-
}
|
|
452
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
361
453
|
};
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
error;
|
|
374
|
-
/**
|
|
375
|
-
* <p>Human-readable text providing additional information, used to assist the client developer
|
|
376
|
-
* in understanding the error that occurred.</p>
|
|
377
|
-
* @public
|
|
378
|
-
*/
|
|
379
|
-
error_description;
|
|
380
|
-
/**
|
|
381
|
-
* @internal
|
|
382
|
-
*/
|
|
383
|
-
constructor(opts) {
|
|
384
|
-
super({
|
|
385
|
-
name: "InvalidClientException",
|
|
386
|
-
$fault: "client",
|
|
387
|
-
...opts
|
|
454
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
455
|
+
const contents = smithyClient.map({});
|
|
456
|
+
const data = parsedOutput.body;
|
|
457
|
+
const doc = smithyClient.take(data, {
|
|
458
|
+
error: smithyClient.expectString,
|
|
459
|
+
error_description: smithyClient.expectString,
|
|
460
|
+
});
|
|
461
|
+
Object.assign(contents, doc);
|
|
462
|
+
const exception = new InternalServerException({
|
|
463
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
464
|
+
...contents,
|
|
388
465
|
});
|
|
389
|
-
|
|
390
|
-
this.error = opts.error;
|
|
391
|
-
this.error_description = opts.error_description;
|
|
392
|
-
}
|
|
466
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
393
467
|
};
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* <p>Single error code. For this exception the value will be <code>invalid_grant</code>.</p>
|
|
402
|
-
* @public
|
|
403
|
-
*/
|
|
404
|
-
error;
|
|
405
|
-
/**
|
|
406
|
-
* <p>Human-readable text providing additional information, used to assist the client developer
|
|
407
|
-
* in understanding the error that occurred.</p>
|
|
408
|
-
* @public
|
|
409
|
-
*/
|
|
410
|
-
error_description;
|
|
411
|
-
/**
|
|
412
|
-
* @internal
|
|
413
|
-
*/
|
|
414
|
-
constructor(opts) {
|
|
415
|
-
super({
|
|
416
|
-
name: "InvalidGrantException",
|
|
417
|
-
$fault: "client",
|
|
418
|
-
...opts
|
|
468
|
+
const de_InvalidClientExceptionRes = async (parsedOutput, context) => {
|
|
469
|
+
const contents = smithyClient.map({});
|
|
470
|
+
const data = parsedOutput.body;
|
|
471
|
+
const doc = smithyClient.take(data, {
|
|
472
|
+
error: smithyClient.expectString,
|
|
473
|
+
error_description: smithyClient.expectString,
|
|
419
474
|
});
|
|
420
|
-
Object.
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
475
|
+
Object.assign(contents, doc);
|
|
476
|
+
const exception = new InvalidClientException({
|
|
477
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
478
|
+
...contents,
|
|
479
|
+
});
|
|
480
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
424
481
|
};
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
482
|
+
const de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
|
|
483
|
+
const contents = smithyClient.map({});
|
|
484
|
+
const data = parsedOutput.body;
|
|
485
|
+
const doc = smithyClient.take(data, {
|
|
486
|
+
error: smithyClient.expectString,
|
|
487
|
+
error_description: smithyClient.expectString,
|
|
488
|
+
});
|
|
489
|
+
Object.assign(contents, doc);
|
|
490
|
+
const exception = new InvalidGrantException({
|
|
491
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
492
|
+
...contents,
|
|
493
|
+
});
|
|
494
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
430
495
|
};
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
* <p>Single error code. For this exception the value will be
|
|
439
|
-
* <code>invalid_request</code>.</p>
|
|
440
|
-
* @public
|
|
441
|
-
*/
|
|
442
|
-
error;
|
|
443
|
-
/**
|
|
444
|
-
* <p>A string that uniquely identifies a reason for the error.</p>
|
|
445
|
-
* @public
|
|
446
|
-
*/
|
|
447
|
-
reason;
|
|
448
|
-
/**
|
|
449
|
-
* <p>Human-readable text providing additional information, used to assist the client developer
|
|
450
|
-
* in understanding the error that occurred.</p>
|
|
451
|
-
* @public
|
|
452
|
-
*/
|
|
453
|
-
error_description;
|
|
454
|
-
/**
|
|
455
|
-
* @internal
|
|
456
|
-
*/
|
|
457
|
-
constructor(opts) {
|
|
458
|
-
super({
|
|
459
|
-
name: "InvalidRequestException",
|
|
460
|
-
$fault: "client",
|
|
461
|
-
...opts
|
|
496
|
+
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
497
|
+
const contents = smithyClient.map({});
|
|
498
|
+
const data = parsedOutput.body;
|
|
499
|
+
const doc = smithyClient.take(data, {
|
|
500
|
+
error: smithyClient.expectString,
|
|
501
|
+
error_description: smithyClient.expectString,
|
|
502
|
+
reason: smithyClient.expectString,
|
|
462
503
|
});
|
|
463
|
-
Object.
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
504
|
+
Object.assign(contents, doc);
|
|
505
|
+
const exception = new InvalidRequestException({
|
|
506
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
507
|
+
...contents,
|
|
508
|
+
});
|
|
509
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
468
510
|
};
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* <p>Human-readable text providing additional information, used to assist the client developer
|
|
482
|
-
* in understanding the error that occurred.</p>
|
|
483
|
-
* @public
|
|
484
|
-
*/
|
|
485
|
-
error_description;
|
|
486
|
-
/**
|
|
487
|
-
* @internal
|
|
488
|
-
*/
|
|
489
|
-
constructor(opts) {
|
|
490
|
-
super({
|
|
491
|
-
name: "InvalidScopeException",
|
|
492
|
-
$fault: "client",
|
|
493
|
-
...opts
|
|
511
|
+
const de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
|
|
512
|
+
const contents = smithyClient.map({});
|
|
513
|
+
const data = parsedOutput.body;
|
|
514
|
+
const doc = smithyClient.take(data, {
|
|
515
|
+
error: smithyClient.expectString,
|
|
516
|
+
error_description: smithyClient.expectString,
|
|
517
|
+
});
|
|
518
|
+
Object.assign(contents, doc);
|
|
519
|
+
const exception = new InvalidScopeException({
|
|
520
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
521
|
+
...contents,
|
|
494
522
|
});
|
|
495
|
-
|
|
496
|
-
this.error = opts.error;
|
|
497
|
-
this.error_description = opts.error_description;
|
|
498
|
-
}
|
|
523
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
499
524
|
};
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* <p>Human-readable text providing additional information, used to assist the client developer
|
|
513
|
-
* in understanding the error that occurred.</p>
|
|
514
|
-
* @public
|
|
515
|
-
*/
|
|
516
|
-
error_description;
|
|
517
|
-
/**
|
|
518
|
-
* @internal
|
|
519
|
-
*/
|
|
520
|
-
constructor(opts) {
|
|
521
|
-
super({
|
|
522
|
-
name: "SlowDownException",
|
|
523
|
-
$fault: "client",
|
|
524
|
-
...opts
|
|
525
|
+
const de_SlowDownExceptionRes = async (parsedOutput, context) => {
|
|
526
|
+
const contents = smithyClient.map({});
|
|
527
|
+
const data = parsedOutput.body;
|
|
528
|
+
const doc = smithyClient.take(data, {
|
|
529
|
+
error: smithyClient.expectString,
|
|
530
|
+
error_description: smithyClient.expectString,
|
|
531
|
+
});
|
|
532
|
+
Object.assign(contents, doc);
|
|
533
|
+
const exception = new SlowDownException({
|
|
534
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
535
|
+
...contents,
|
|
525
536
|
});
|
|
526
|
-
|
|
527
|
-
this.error = opts.error;
|
|
528
|
-
this.error_description = opts.error_description;
|
|
529
|
-
}
|
|
537
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
530
538
|
};
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
* <p>Single error code. For this exception the value will be
|
|
539
|
-
* <code>unauthorized_client</code>.</p>
|
|
540
|
-
* @public
|
|
541
|
-
*/
|
|
542
|
-
error;
|
|
543
|
-
/**
|
|
544
|
-
* <p>Human-readable text providing additional information, used to assist the client developer
|
|
545
|
-
* in understanding the error that occurred.</p>
|
|
546
|
-
* @public
|
|
547
|
-
*/
|
|
548
|
-
error_description;
|
|
549
|
-
/**
|
|
550
|
-
* @internal
|
|
551
|
-
*/
|
|
552
|
-
constructor(opts) {
|
|
553
|
-
super({
|
|
554
|
-
name: "UnauthorizedClientException",
|
|
555
|
-
$fault: "client",
|
|
556
|
-
...opts
|
|
539
|
+
const de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
|
|
540
|
+
const contents = smithyClient.map({});
|
|
541
|
+
const data = parsedOutput.body;
|
|
542
|
+
const doc = smithyClient.take(data, {
|
|
543
|
+
error: smithyClient.expectString,
|
|
544
|
+
error_description: smithyClient.expectString,
|
|
557
545
|
});
|
|
558
|
-
Object.
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
546
|
+
Object.assign(contents, doc);
|
|
547
|
+
const exception = new UnauthorizedClientException({
|
|
548
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
549
|
+
...contents,
|
|
550
|
+
});
|
|
551
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
562
552
|
};
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
error;
|
|
575
|
-
/**
|
|
576
|
-
* <p>Human-readable text providing additional information, used to assist the client developer
|
|
577
|
-
* in understanding the error that occurred.</p>
|
|
578
|
-
* @public
|
|
579
|
-
*/
|
|
580
|
-
error_description;
|
|
581
|
-
/**
|
|
582
|
-
* @internal
|
|
583
|
-
*/
|
|
584
|
-
constructor(opts) {
|
|
585
|
-
super({
|
|
586
|
-
name: "UnsupportedGrantTypeException",
|
|
587
|
-
$fault: "client",
|
|
588
|
-
...opts
|
|
553
|
+
const de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => {
|
|
554
|
+
const contents = smithyClient.map({});
|
|
555
|
+
const data = parsedOutput.body;
|
|
556
|
+
const doc = smithyClient.take(data, {
|
|
557
|
+
error: smithyClient.expectString,
|
|
558
|
+
error_description: smithyClient.expectString,
|
|
559
|
+
});
|
|
560
|
+
Object.assign(contents, doc);
|
|
561
|
+
const exception = new UnsupportedGrantTypeException({
|
|
562
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
563
|
+
...contents,
|
|
589
564
|
});
|
|
590
|
-
|
|
591
|
-
this.error = opts.error;
|
|
592
|
-
this.error_description = opts.error_description;
|
|
593
|
-
}
|
|
565
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
594
566
|
};
|
|
567
|
+
const deserializeMetadata = (output) => ({
|
|
568
|
+
httpStatusCode: output.statusCode,
|
|
569
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
570
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
571
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
572
|
+
});
|
|
595
573
|
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
(
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
codeVerifier: [],
|
|
613
|
-
deviceCode: [],
|
|
614
|
-
grantType: [],
|
|
615
|
-
redirectUri: [],
|
|
616
|
-
refreshToken: [],
|
|
617
|
-
scope: /* @__PURE__ */ __name((_) => (0, import_smithy_client5._json)(_), "scope")
|
|
618
|
-
})
|
|
619
|
-
);
|
|
620
|
-
b.m("POST").h(headers).b(body);
|
|
621
|
-
return b.build();
|
|
622
|
-
}, "se_CreateTokenCommand");
|
|
623
|
-
var de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
624
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
625
|
-
return de_CommandError(output, context);
|
|
626
|
-
}
|
|
627
|
-
const contents = (0, import_smithy_client5.map)({
|
|
628
|
-
$metadata: deserializeMetadata(output)
|
|
629
|
-
});
|
|
630
|
-
const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
631
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
632
|
-
accessToken: import_smithy_client5.expectString,
|
|
633
|
-
expiresIn: import_smithy_client5.expectInt32,
|
|
634
|
-
idToken: import_smithy_client5.expectString,
|
|
635
|
-
refreshToken: import_smithy_client5.expectString,
|
|
636
|
-
tokenType: import_smithy_client5.expectString
|
|
637
|
-
});
|
|
638
|
-
Object.assign(contents, doc);
|
|
639
|
-
return contents;
|
|
640
|
-
}, "de_CreateTokenCommand");
|
|
641
|
-
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
642
|
-
const parsedOutput = {
|
|
643
|
-
...output,
|
|
644
|
-
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
645
|
-
};
|
|
646
|
-
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
647
|
-
switch (errorCode) {
|
|
648
|
-
case "AccessDeniedException":
|
|
649
|
-
case "com.amazonaws.ssooidc#AccessDeniedException":
|
|
650
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
651
|
-
case "AuthorizationPendingException":
|
|
652
|
-
case "com.amazonaws.ssooidc#AuthorizationPendingException":
|
|
653
|
-
throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
|
|
654
|
-
case "ExpiredTokenException":
|
|
655
|
-
case "com.amazonaws.ssooidc#ExpiredTokenException":
|
|
656
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
|
657
|
-
case "InternalServerException":
|
|
658
|
-
case "com.amazonaws.ssooidc#InternalServerException":
|
|
659
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
660
|
-
case "InvalidClientException":
|
|
661
|
-
case "com.amazonaws.ssooidc#InvalidClientException":
|
|
662
|
-
throw await de_InvalidClientExceptionRes(parsedOutput, context);
|
|
663
|
-
case "InvalidGrantException":
|
|
664
|
-
case "com.amazonaws.ssooidc#InvalidGrantException":
|
|
665
|
-
throw await de_InvalidGrantExceptionRes(parsedOutput, context);
|
|
666
|
-
case "InvalidRequestException":
|
|
667
|
-
case "com.amazonaws.ssooidc#InvalidRequestException":
|
|
668
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
669
|
-
case "InvalidScopeException":
|
|
670
|
-
case "com.amazonaws.ssooidc#InvalidScopeException":
|
|
671
|
-
throw await de_InvalidScopeExceptionRes(parsedOutput, context);
|
|
672
|
-
case "SlowDownException":
|
|
673
|
-
case "com.amazonaws.ssooidc#SlowDownException":
|
|
674
|
-
throw await de_SlowDownExceptionRes(parsedOutput, context);
|
|
675
|
-
case "UnauthorizedClientException":
|
|
676
|
-
case "com.amazonaws.ssooidc#UnauthorizedClientException":
|
|
677
|
-
throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
|
|
678
|
-
case "UnsupportedGrantTypeException":
|
|
679
|
-
case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
|
|
680
|
-
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
|
|
681
|
-
default:
|
|
682
|
-
const parsedBody = parsedOutput.body;
|
|
683
|
-
return throwDefaultError({
|
|
684
|
-
output,
|
|
685
|
-
parsedBody,
|
|
686
|
-
errorCode
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
}, "de_CommandError");
|
|
690
|
-
var throwDefaultError = (0, import_smithy_client5.withBaseException)(SSOOIDCServiceException);
|
|
691
|
-
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
692
|
-
const contents = (0, import_smithy_client5.map)({});
|
|
693
|
-
const data = parsedOutput.body;
|
|
694
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
695
|
-
error: import_smithy_client5.expectString,
|
|
696
|
-
error_description: import_smithy_client5.expectString,
|
|
697
|
-
reason: import_smithy_client5.expectString
|
|
698
|
-
});
|
|
699
|
-
Object.assign(contents, doc);
|
|
700
|
-
const exception = new AccessDeniedException({
|
|
701
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
702
|
-
...contents
|
|
703
|
-
});
|
|
704
|
-
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
|
|
705
|
-
}, "de_AccessDeniedExceptionRes");
|
|
706
|
-
var de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
707
|
-
const contents = (0, import_smithy_client5.map)({});
|
|
708
|
-
const data = parsedOutput.body;
|
|
709
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
710
|
-
error: import_smithy_client5.expectString,
|
|
711
|
-
error_description: import_smithy_client5.expectString
|
|
712
|
-
});
|
|
713
|
-
Object.assign(contents, doc);
|
|
714
|
-
const exception = new AuthorizationPendingException({
|
|
715
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
716
|
-
...contents
|
|
717
|
-
});
|
|
718
|
-
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
|
|
719
|
-
}, "de_AuthorizationPendingExceptionRes");
|
|
720
|
-
var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
721
|
-
const contents = (0, import_smithy_client5.map)({});
|
|
722
|
-
const data = parsedOutput.body;
|
|
723
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
724
|
-
error: import_smithy_client5.expectString,
|
|
725
|
-
error_description: import_smithy_client5.expectString
|
|
726
|
-
});
|
|
727
|
-
Object.assign(contents, doc);
|
|
728
|
-
const exception = new ExpiredTokenException({
|
|
729
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
730
|
-
...contents
|
|
731
|
-
});
|
|
732
|
-
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
|
|
733
|
-
}, "de_ExpiredTokenExceptionRes");
|
|
734
|
-
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
735
|
-
const contents = (0, import_smithy_client5.map)({});
|
|
736
|
-
const data = parsedOutput.body;
|
|
737
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
738
|
-
error: import_smithy_client5.expectString,
|
|
739
|
-
error_description: import_smithy_client5.expectString
|
|
740
|
-
});
|
|
741
|
-
Object.assign(contents, doc);
|
|
742
|
-
const exception = new InternalServerException({
|
|
743
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
744
|
-
...contents
|
|
745
|
-
});
|
|
746
|
-
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
|
|
747
|
-
}, "de_InternalServerExceptionRes");
|
|
748
|
-
var de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
749
|
-
const contents = (0, import_smithy_client5.map)({});
|
|
750
|
-
const data = parsedOutput.body;
|
|
751
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
752
|
-
error: import_smithy_client5.expectString,
|
|
753
|
-
error_description: import_smithy_client5.expectString
|
|
754
|
-
});
|
|
755
|
-
Object.assign(contents, doc);
|
|
756
|
-
const exception = new InvalidClientException({
|
|
757
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
758
|
-
...contents
|
|
759
|
-
});
|
|
760
|
-
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
|
|
761
|
-
}, "de_InvalidClientExceptionRes");
|
|
762
|
-
var de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
763
|
-
const contents = (0, import_smithy_client5.map)({});
|
|
764
|
-
const data = parsedOutput.body;
|
|
765
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
766
|
-
error: import_smithy_client5.expectString,
|
|
767
|
-
error_description: import_smithy_client5.expectString
|
|
768
|
-
});
|
|
769
|
-
Object.assign(contents, doc);
|
|
770
|
-
const exception = new InvalidGrantException({
|
|
771
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
772
|
-
...contents
|
|
773
|
-
});
|
|
774
|
-
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
|
|
775
|
-
}, "de_InvalidGrantExceptionRes");
|
|
776
|
-
var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
777
|
-
const contents = (0, import_smithy_client5.map)({});
|
|
778
|
-
const data = parsedOutput.body;
|
|
779
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
780
|
-
error: import_smithy_client5.expectString,
|
|
781
|
-
error_description: import_smithy_client5.expectString,
|
|
782
|
-
reason: import_smithy_client5.expectString
|
|
783
|
-
});
|
|
784
|
-
Object.assign(contents, doc);
|
|
785
|
-
const exception = new InvalidRequestException({
|
|
786
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
787
|
-
...contents
|
|
788
|
-
});
|
|
789
|
-
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
|
|
790
|
-
}, "de_InvalidRequestExceptionRes");
|
|
791
|
-
var de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
792
|
-
const contents = (0, import_smithy_client5.map)({});
|
|
793
|
-
const data = parsedOutput.body;
|
|
794
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
795
|
-
error: import_smithy_client5.expectString,
|
|
796
|
-
error_description: import_smithy_client5.expectString
|
|
797
|
-
});
|
|
798
|
-
Object.assign(contents, doc);
|
|
799
|
-
const exception = new InvalidScopeException({
|
|
800
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
801
|
-
...contents
|
|
802
|
-
});
|
|
803
|
-
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
|
|
804
|
-
}, "de_InvalidScopeExceptionRes");
|
|
805
|
-
var de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
806
|
-
const contents = (0, import_smithy_client5.map)({});
|
|
807
|
-
const data = parsedOutput.body;
|
|
808
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
809
|
-
error: import_smithy_client5.expectString,
|
|
810
|
-
error_description: import_smithy_client5.expectString
|
|
811
|
-
});
|
|
812
|
-
Object.assign(contents, doc);
|
|
813
|
-
const exception = new SlowDownException({
|
|
814
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
815
|
-
...contents
|
|
816
|
-
});
|
|
817
|
-
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
|
|
818
|
-
}, "de_SlowDownExceptionRes");
|
|
819
|
-
var de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
820
|
-
const contents = (0, import_smithy_client5.map)({});
|
|
821
|
-
const data = parsedOutput.body;
|
|
822
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
823
|
-
error: import_smithy_client5.expectString,
|
|
824
|
-
error_description: import_smithy_client5.expectString
|
|
825
|
-
});
|
|
826
|
-
Object.assign(contents, doc);
|
|
827
|
-
const exception = new UnauthorizedClientException({
|
|
828
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
829
|
-
...contents
|
|
830
|
-
});
|
|
831
|
-
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
|
|
832
|
-
}, "de_UnauthorizedClientExceptionRes");
|
|
833
|
-
var de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
834
|
-
const contents = (0, import_smithy_client5.map)({});
|
|
835
|
-
const data = parsedOutput.body;
|
|
836
|
-
const doc = (0, import_smithy_client5.take)(data, {
|
|
837
|
-
error: import_smithy_client5.expectString,
|
|
838
|
-
error_description: import_smithy_client5.expectString
|
|
839
|
-
});
|
|
840
|
-
Object.assign(contents, doc);
|
|
841
|
-
const exception = new UnsupportedGrantTypeException({
|
|
842
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
843
|
-
...contents
|
|
844
|
-
});
|
|
845
|
-
return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
|
|
846
|
-
}, "de_UnsupportedGrantTypeExceptionRes");
|
|
847
|
-
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
848
|
-
httpStatusCode: output.statusCode,
|
|
849
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
850
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
851
|
-
cfId: output.headers["x-amz-cf-id"]
|
|
852
|
-
}), "deserializeMetadata");
|
|
574
|
+
class CreateTokenCommand extends smithyClient.Command
|
|
575
|
+
.classBuilder()
|
|
576
|
+
.ep(commonParams)
|
|
577
|
+
.m(function (Command, cs, config, o) {
|
|
578
|
+
return [
|
|
579
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
580
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
581
|
+
];
|
|
582
|
+
})
|
|
583
|
+
.s("AWSSSOOIDCService", "CreateToken", {})
|
|
584
|
+
.n("SSOOIDCClient", "CreateTokenCommand")
|
|
585
|
+
.f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog)
|
|
586
|
+
.ser(se_CreateTokenCommand)
|
|
587
|
+
.de(de_CreateTokenCommand)
|
|
588
|
+
.build() {
|
|
589
|
+
}
|
|
853
590
|
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
return [
|
|
857
|
-
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
858
|
-
(0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
859
|
-
];
|
|
860
|
-
}).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {
|
|
861
|
-
static {
|
|
862
|
-
__name(this, "CreateTokenCommand");
|
|
863
|
-
}
|
|
591
|
+
const commands = {
|
|
592
|
+
CreateTokenCommand,
|
|
864
593
|
};
|
|
594
|
+
class SSOOIDC extends SSOOIDCClient {
|
|
595
|
+
}
|
|
596
|
+
smithyClient.createAggregatedClient(commands, SSOOIDC);
|
|
865
597
|
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
};
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
}
|
|
874
|
-
};
|
|
875
|
-
(0, import_smithy_client7.createAggregatedClient)(commands, SSOOIDC);
|
|
876
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
877
|
-
0 && (module.exports = {
|
|
878
|
-
$Command,
|
|
879
|
-
AccessDeniedException,
|
|
880
|
-
AccessDeniedExceptionReason,
|
|
881
|
-
AuthorizationPendingException,
|
|
882
|
-
CreateTokenCommand,
|
|
883
|
-
CreateTokenRequestFilterSensitiveLog,
|
|
884
|
-
CreateTokenResponseFilterSensitiveLog,
|
|
885
|
-
ExpiredTokenException,
|
|
886
|
-
InternalServerException,
|
|
887
|
-
InvalidClientException,
|
|
888
|
-
InvalidGrantException,
|
|
889
|
-
InvalidRequestException,
|
|
890
|
-
InvalidRequestExceptionReason,
|
|
891
|
-
InvalidScopeException,
|
|
892
|
-
SSOOIDC,
|
|
893
|
-
SSOOIDCClient,
|
|
894
|
-
SSOOIDCServiceException,
|
|
895
|
-
SlowDownException,
|
|
896
|
-
UnauthorizedClientException,
|
|
897
|
-
UnsupportedGrantTypeException,
|
|
898
|
-
__Client
|
|
598
|
+
Object.defineProperty(exports, "$Command", {
|
|
599
|
+
enumerable: true,
|
|
600
|
+
get: function () { return smithyClient.Command; }
|
|
601
|
+
});
|
|
602
|
+
Object.defineProperty(exports, "__Client", {
|
|
603
|
+
enumerable: true,
|
|
604
|
+
get: function () { return smithyClient.Client; }
|
|
899
605
|
});
|
|
606
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
607
|
+
exports.AccessDeniedExceptionReason = AccessDeniedExceptionReason;
|
|
608
|
+
exports.AuthorizationPendingException = AuthorizationPendingException;
|
|
609
|
+
exports.CreateTokenCommand = CreateTokenCommand;
|
|
610
|
+
exports.CreateTokenRequestFilterSensitiveLog = CreateTokenRequestFilterSensitiveLog;
|
|
611
|
+
exports.CreateTokenResponseFilterSensitiveLog = CreateTokenResponseFilterSensitiveLog;
|
|
612
|
+
exports.ExpiredTokenException = ExpiredTokenException;
|
|
613
|
+
exports.InternalServerException = InternalServerException;
|
|
614
|
+
exports.InvalidClientException = InvalidClientException;
|
|
615
|
+
exports.InvalidGrantException = InvalidGrantException;
|
|
616
|
+
exports.InvalidRequestException = InvalidRequestException;
|
|
617
|
+
exports.InvalidRequestExceptionReason = InvalidRequestExceptionReason;
|
|
618
|
+
exports.InvalidScopeException = InvalidScopeException;
|
|
619
|
+
exports.SSOOIDC = SSOOIDC;
|
|
620
|
+
exports.SSOOIDCClient = SSOOIDCClient;
|
|
621
|
+
exports.SSOOIDCServiceException = SSOOIDCServiceException;
|
|
622
|
+
exports.SlowDownException = SlowDownException;
|
|
623
|
+
exports.UnauthorizedClientException = UnauthorizedClientException;
|
|
624
|
+
exports.UnsupportedGrantTypeException = UnsupportedGrantTypeException;
|