@aws-sdk/client-sso-oidc 3.928.0 → 3.929.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +430 -538
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/SSOOIDCClient.js +2 -0
- package/dist-es/commands/CreateTokenCommand.js +3 -10
- package/dist-es/commands/CreateTokenWithIAMCommand.js +3 -10
- package/dist-es/commands/RegisterClientCommand.js +3 -10
- package/dist-es/commands/StartDeviceAuthorizationCommand.js +3 -10
- package/dist-es/models/models_0.js +0 -34
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +382 -0
- package/dist-types/SSOOIDCClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +0 -24
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +40 -0
- package/dist-types/ts3.4/SSOOIDCClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -18
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +45 -0
- package/package.json +2 -2
- package/dist-es/protocols/Aws_restJson1.js +0 -430
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -38
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -53
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { StaticErrorSchema, StaticOperationSchema, StaticSimpleSchema, StaticStructureSchema } from "@smithy/types";
|
|
2
|
+
export declare var AccessToken: StaticSimpleSchema;
|
|
3
|
+
export declare var Assertion: StaticSimpleSchema;
|
|
4
|
+
export declare var ClientSecret: StaticSimpleSchema;
|
|
5
|
+
export declare var CodeVerifier: StaticSimpleSchema;
|
|
6
|
+
export declare var IdToken: StaticSimpleSchema;
|
|
7
|
+
export declare var RefreshToken: StaticSimpleSchema;
|
|
8
|
+
export declare var SubjectToken: StaticSimpleSchema;
|
|
9
|
+
export declare var AccessDeniedException: StaticErrorSchema;
|
|
10
|
+
export declare var AuthorizationPendingException: StaticErrorSchema;
|
|
11
|
+
export declare var AwsAdditionalDetails: StaticStructureSchema;
|
|
12
|
+
export declare var CreateTokenRequest: StaticStructureSchema;
|
|
13
|
+
export declare var CreateTokenResponse: StaticStructureSchema;
|
|
14
|
+
export declare var CreateTokenWithIAMRequest: StaticStructureSchema;
|
|
15
|
+
export declare var CreateTokenWithIAMResponse: StaticStructureSchema;
|
|
16
|
+
export declare var ExpiredTokenException: StaticErrorSchema;
|
|
17
|
+
export declare var InternalServerException: StaticErrorSchema;
|
|
18
|
+
export declare var InvalidClientException: StaticErrorSchema;
|
|
19
|
+
export declare var InvalidClientMetadataException: StaticErrorSchema;
|
|
20
|
+
export declare var InvalidGrantException: StaticErrorSchema;
|
|
21
|
+
export declare var InvalidRedirectUriException: StaticErrorSchema;
|
|
22
|
+
export declare var InvalidRequestException: StaticErrorSchema;
|
|
23
|
+
export declare var InvalidRequestRegionException: StaticErrorSchema;
|
|
24
|
+
export declare var InvalidScopeException: StaticErrorSchema;
|
|
25
|
+
export declare var RegisterClientRequest: StaticStructureSchema;
|
|
26
|
+
export declare var RegisterClientResponse: StaticStructureSchema;
|
|
27
|
+
export declare var SlowDownException: StaticErrorSchema;
|
|
28
|
+
export declare var StartDeviceAuthorizationRequest: StaticStructureSchema;
|
|
29
|
+
export declare var StartDeviceAuthorizationResponse: StaticStructureSchema;
|
|
30
|
+
export declare var UnauthorizedClientException: StaticErrorSchema;
|
|
31
|
+
export declare var UnsupportedGrantTypeException: StaticErrorSchema;
|
|
32
|
+
export declare var __Unit: "unit";
|
|
33
|
+
export declare var SSOOIDCServiceException: StaticErrorSchema;
|
|
34
|
+
export declare var GrantTypes: number;
|
|
35
|
+
export declare var RedirectUris: number;
|
|
36
|
+
export declare var Scopes: number;
|
|
37
|
+
export declare var CreateToken: StaticOperationSchema;
|
|
38
|
+
export declare var CreateTokenWithIAM: StaticOperationSchema;
|
|
39
|
+
export declare var RegisterClient: StaticOperationSchema;
|
|
40
|
+
export declare var StartDeviceAuthorization: StaticOperationSchema;
|
|
@@ -30,10 +30,13 @@ import {
|
|
|
30
30
|
BodyLengthCalculator as __BodyLengthCalculator,
|
|
31
31
|
CheckOptionalClientConfig as __CheckOptionalClientConfig,
|
|
32
32
|
ChecksumConstructor as __ChecksumConstructor,
|
|
33
|
+
ClientProtocol,
|
|
33
34
|
Decoder as __Decoder,
|
|
34
35
|
Encoder as __Encoder,
|
|
35
36
|
HashConstructor as __HashConstructor,
|
|
36
37
|
HttpHandlerOptions as __HttpHandlerOptions,
|
|
38
|
+
HttpRequest,
|
|
39
|
+
HttpResponse,
|
|
37
40
|
Logger as __Logger,
|
|
38
41
|
Provider as __Provider,
|
|
39
42
|
Provider,
|
|
@@ -102,6 +105,7 @@ export interface ClientDefaults
|
|
|
102
105
|
retryMode?: string | __Provider<string>;
|
|
103
106
|
logger?: __Logger;
|
|
104
107
|
extensions?: RuntimeExtension[];
|
|
108
|
+
protocol?: ClientProtocol<HttpRequest, HttpResponse>;
|
|
105
109
|
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
106
110
|
}
|
|
107
111
|
export type SSOOIDCClientConfigType = Partial<
|
|
@@ -215,21 +215,3 @@ export interface StartDeviceAuthorizationResponse {
|
|
|
215
215
|
expiresIn?: number | undefined;
|
|
216
216
|
interval?: number | undefined;
|
|
217
217
|
}
|
|
218
|
-
export declare const CreateTokenRequestFilterSensitiveLog: (
|
|
219
|
-
obj: CreateTokenRequest
|
|
220
|
-
) => any;
|
|
221
|
-
export declare const CreateTokenResponseFilterSensitiveLog: (
|
|
222
|
-
obj: CreateTokenResponse
|
|
223
|
-
) => any;
|
|
224
|
-
export declare const CreateTokenWithIAMRequestFilterSensitiveLog: (
|
|
225
|
-
obj: CreateTokenWithIAMRequest
|
|
226
|
-
) => any;
|
|
227
|
-
export declare const CreateTokenWithIAMResponseFilterSensitiveLog: (
|
|
228
|
-
obj: CreateTokenWithIAMResponse
|
|
229
|
-
) => any;
|
|
230
|
-
export declare const RegisterClientResponseFilterSensitiveLog: (
|
|
231
|
-
obj: RegisterClientResponse
|
|
232
|
-
) => any;
|
|
233
|
-
export declare const StartDeviceAuthorizationRequestFilterSensitiveLog: (
|
|
234
|
-
obj: StartDeviceAuthorizationRequest
|
|
235
|
-
) => any;
|
|
@@ -38,6 +38,10 @@ export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => {
|
|
|
38
38
|
profile?: string;
|
|
39
39
|
logger: import("@smithy/types").Logger;
|
|
40
40
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
41
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
42
|
+
import("@smithy/types").HttpRequest,
|
|
43
|
+
import("@smithy/types").HttpResponse
|
|
44
|
+
>;
|
|
41
45
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
42
46
|
userAgentAppId?:
|
|
43
47
|
| string
|
|
@@ -38,6 +38,10 @@ export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => {
|
|
|
38
38
|
profile?: string;
|
|
39
39
|
logger: import("@smithy/types").Logger;
|
|
40
40
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
41
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
42
|
+
import("@smithy/types").HttpRequest,
|
|
43
|
+
import("@smithy/types").HttpResponse
|
|
44
|
+
>;
|
|
41
45
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
42
46
|
retryStrategy?:
|
|
43
47
|
| import("@smithy/types").RetryStrategy
|
|
@@ -37,6 +37,10 @@ export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => {
|
|
|
37
37
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
38
38
|
logger: import("@smithy/types").Logger;
|
|
39
39
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
40
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
41
|
+
import("@smithy/types").HttpRequest,
|
|
42
|
+
import("@smithy/types").HttpResponse
|
|
43
|
+
>;
|
|
40
44
|
defaultsMode:
|
|
41
45
|
| import("@smithy/smithy-client").DefaultsMode
|
|
42
46
|
| import("@smithy/types").Provider<
|
|
@@ -42,6 +42,10 @@ export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => {
|
|
|
42
42
|
}
|
|
43
43
|
)[];
|
|
44
44
|
logger: import("@smithy/types").Logger;
|
|
45
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
46
|
+
import("@smithy/types").HttpRequest,
|
|
47
|
+
import("@smithy/types").HttpResponse
|
|
48
|
+
>;
|
|
45
49
|
serviceId: string;
|
|
46
50
|
urlParser: import("@smithy/types").UrlParser;
|
|
47
51
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StaticErrorSchema,
|
|
3
|
+
StaticOperationSchema,
|
|
4
|
+
StaticSimpleSchema,
|
|
5
|
+
StaticStructureSchema,
|
|
6
|
+
} from "@smithy/types";
|
|
7
|
+
export declare var AccessToken: StaticSimpleSchema;
|
|
8
|
+
export declare var Assertion: StaticSimpleSchema;
|
|
9
|
+
export declare var ClientSecret: StaticSimpleSchema;
|
|
10
|
+
export declare var CodeVerifier: StaticSimpleSchema;
|
|
11
|
+
export declare var IdToken: StaticSimpleSchema;
|
|
12
|
+
export declare var RefreshToken: StaticSimpleSchema;
|
|
13
|
+
export declare var SubjectToken: StaticSimpleSchema;
|
|
14
|
+
export declare var AccessDeniedException: StaticErrorSchema;
|
|
15
|
+
export declare var AuthorizationPendingException: StaticErrorSchema;
|
|
16
|
+
export declare var AwsAdditionalDetails: StaticStructureSchema;
|
|
17
|
+
export declare var CreateTokenRequest: StaticStructureSchema;
|
|
18
|
+
export declare var CreateTokenResponse: StaticStructureSchema;
|
|
19
|
+
export declare var CreateTokenWithIAMRequest: StaticStructureSchema;
|
|
20
|
+
export declare var CreateTokenWithIAMResponse: StaticStructureSchema;
|
|
21
|
+
export declare var ExpiredTokenException: StaticErrorSchema;
|
|
22
|
+
export declare var InternalServerException: StaticErrorSchema;
|
|
23
|
+
export declare var InvalidClientException: StaticErrorSchema;
|
|
24
|
+
export declare var InvalidClientMetadataException: StaticErrorSchema;
|
|
25
|
+
export declare var InvalidGrantException: StaticErrorSchema;
|
|
26
|
+
export declare var InvalidRedirectUriException: StaticErrorSchema;
|
|
27
|
+
export declare var InvalidRequestException: StaticErrorSchema;
|
|
28
|
+
export declare var InvalidRequestRegionException: StaticErrorSchema;
|
|
29
|
+
export declare var InvalidScopeException: StaticErrorSchema;
|
|
30
|
+
export declare var RegisterClientRequest: StaticStructureSchema;
|
|
31
|
+
export declare var RegisterClientResponse: StaticStructureSchema;
|
|
32
|
+
export declare var SlowDownException: StaticErrorSchema;
|
|
33
|
+
export declare var StartDeviceAuthorizationRequest: StaticStructureSchema;
|
|
34
|
+
export declare var StartDeviceAuthorizationResponse: StaticStructureSchema;
|
|
35
|
+
export declare var UnauthorizedClientException: StaticErrorSchema;
|
|
36
|
+
export declare var UnsupportedGrantTypeException: StaticErrorSchema;
|
|
37
|
+
export declare var __Unit: "unit";
|
|
38
|
+
export declare var SSOOIDCServiceException: StaticErrorSchema;
|
|
39
|
+
export declare var GrantTypes: number;
|
|
40
|
+
export declare var RedirectUris: number;
|
|
41
|
+
export declare var Scopes: number;
|
|
42
|
+
export declare var CreateToken: StaticOperationSchema;
|
|
43
|
+
export declare var CreateTokenWithIAM: StaticOperationSchema;
|
|
44
|
+
export declare var RegisterClient: StaticOperationSchema;
|
|
45
|
+
export declare var StartDeviceAuthorization: StaticOperationSchema;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sso-oidc",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.929.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-sso-oidc",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
23
|
"@aws-sdk/core": "3.928.0",
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.929.0",
|
|
25
25
|
"@aws-sdk/middleware-host-header": "3.922.0",
|
|
26
26
|
"@aws-sdk/middleware-logger": "3.922.0",
|
|
27
27
|
"@aws-sdk/middleware-recursion-detection": "3.922.0",
|
|
@@ -1,430 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { AccessDeniedException, AuthorizationPendingException, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidClientMetadataException, InvalidGrantException, InvalidRedirectUriException, InvalidRequestException, InvalidRequestRegionException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException, } from "../models/models_0";
|
|
5
|
-
import { SSOOIDCServiceException as __BaseException } from "../models/SSOOIDCServiceException";
|
|
6
|
-
export const se_CreateTokenCommand = async (input, context) => {
|
|
7
|
-
const b = rb(input, context);
|
|
8
|
-
const headers = {
|
|
9
|
-
"content-type": "application/json",
|
|
10
|
-
};
|
|
11
|
-
b.bp("/token");
|
|
12
|
-
let body;
|
|
13
|
-
body = JSON.stringify(take(input, {
|
|
14
|
-
clientId: [],
|
|
15
|
-
clientSecret: [],
|
|
16
|
-
code: [],
|
|
17
|
-
codeVerifier: [],
|
|
18
|
-
deviceCode: [],
|
|
19
|
-
grantType: [],
|
|
20
|
-
redirectUri: [],
|
|
21
|
-
refreshToken: [],
|
|
22
|
-
scope: (_) => _json(_),
|
|
23
|
-
}));
|
|
24
|
-
b.m("POST").h(headers).b(body);
|
|
25
|
-
return b.build();
|
|
26
|
-
};
|
|
27
|
-
export const se_CreateTokenWithIAMCommand = async (input, context) => {
|
|
28
|
-
const b = rb(input, context);
|
|
29
|
-
const headers = {
|
|
30
|
-
"content-type": "application/json",
|
|
31
|
-
};
|
|
32
|
-
b.bp("/token");
|
|
33
|
-
const query = map({
|
|
34
|
-
[_ai]: [, "t"],
|
|
35
|
-
});
|
|
36
|
-
let body;
|
|
37
|
-
body = JSON.stringify(take(input, {
|
|
38
|
-
assertion: [],
|
|
39
|
-
clientId: [],
|
|
40
|
-
code: [],
|
|
41
|
-
codeVerifier: [],
|
|
42
|
-
grantType: [],
|
|
43
|
-
redirectUri: [],
|
|
44
|
-
refreshToken: [],
|
|
45
|
-
requestedTokenType: [],
|
|
46
|
-
scope: (_) => _json(_),
|
|
47
|
-
subjectToken: [],
|
|
48
|
-
subjectTokenType: [],
|
|
49
|
-
}));
|
|
50
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
51
|
-
return b.build();
|
|
52
|
-
};
|
|
53
|
-
export const se_RegisterClientCommand = async (input, context) => {
|
|
54
|
-
const b = rb(input, context);
|
|
55
|
-
const headers = {
|
|
56
|
-
"content-type": "application/json",
|
|
57
|
-
};
|
|
58
|
-
b.bp("/client/register");
|
|
59
|
-
let body;
|
|
60
|
-
body = JSON.stringify(take(input, {
|
|
61
|
-
clientName: [],
|
|
62
|
-
clientType: [],
|
|
63
|
-
entitledApplicationArn: [],
|
|
64
|
-
grantTypes: (_) => _json(_),
|
|
65
|
-
issuerUrl: [],
|
|
66
|
-
redirectUris: (_) => _json(_),
|
|
67
|
-
scopes: (_) => _json(_),
|
|
68
|
-
}));
|
|
69
|
-
b.m("POST").h(headers).b(body);
|
|
70
|
-
return b.build();
|
|
71
|
-
};
|
|
72
|
-
export const se_StartDeviceAuthorizationCommand = async (input, context) => {
|
|
73
|
-
const b = rb(input, context);
|
|
74
|
-
const headers = {
|
|
75
|
-
"content-type": "application/json",
|
|
76
|
-
};
|
|
77
|
-
b.bp("/device_authorization");
|
|
78
|
-
let body;
|
|
79
|
-
body = JSON.stringify(take(input, {
|
|
80
|
-
clientId: [],
|
|
81
|
-
clientSecret: [],
|
|
82
|
-
startUrl: [],
|
|
83
|
-
}));
|
|
84
|
-
b.m("POST").h(headers).b(body);
|
|
85
|
-
return b.build();
|
|
86
|
-
};
|
|
87
|
-
export const de_CreateTokenCommand = async (output, context) => {
|
|
88
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
89
|
-
return de_CommandError(output, context);
|
|
90
|
-
}
|
|
91
|
-
const contents = map({
|
|
92
|
-
$metadata: deserializeMetadata(output),
|
|
93
|
-
});
|
|
94
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
95
|
-
const doc = take(data, {
|
|
96
|
-
accessToken: __expectString,
|
|
97
|
-
expiresIn: __expectInt32,
|
|
98
|
-
idToken: __expectString,
|
|
99
|
-
refreshToken: __expectString,
|
|
100
|
-
tokenType: __expectString,
|
|
101
|
-
});
|
|
102
|
-
Object.assign(contents, doc);
|
|
103
|
-
return contents;
|
|
104
|
-
};
|
|
105
|
-
export const de_CreateTokenWithIAMCommand = async (output, context) => {
|
|
106
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
107
|
-
return de_CommandError(output, context);
|
|
108
|
-
}
|
|
109
|
-
const contents = map({
|
|
110
|
-
$metadata: deserializeMetadata(output),
|
|
111
|
-
});
|
|
112
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
113
|
-
const doc = take(data, {
|
|
114
|
-
accessToken: __expectString,
|
|
115
|
-
awsAdditionalDetails: _json,
|
|
116
|
-
expiresIn: __expectInt32,
|
|
117
|
-
idToken: __expectString,
|
|
118
|
-
issuedTokenType: __expectString,
|
|
119
|
-
refreshToken: __expectString,
|
|
120
|
-
scope: _json,
|
|
121
|
-
tokenType: __expectString,
|
|
122
|
-
});
|
|
123
|
-
Object.assign(contents, doc);
|
|
124
|
-
return contents;
|
|
125
|
-
};
|
|
126
|
-
export const de_RegisterClientCommand = async (output, context) => {
|
|
127
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
128
|
-
return de_CommandError(output, context);
|
|
129
|
-
}
|
|
130
|
-
const contents = map({
|
|
131
|
-
$metadata: deserializeMetadata(output),
|
|
132
|
-
});
|
|
133
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
134
|
-
const doc = take(data, {
|
|
135
|
-
authorizationEndpoint: __expectString,
|
|
136
|
-
clientId: __expectString,
|
|
137
|
-
clientIdIssuedAt: __expectLong,
|
|
138
|
-
clientSecret: __expectString,
|
|
139
|
-
clientSecretExpiresAt: __expectLong,
|
|
140
|
-
tokenEndpoint: __expectString,
|
|
141
|
-
});
|
|
142
|
-
Object.assign(contents, doc);
|
|
143
|
-
return contents;
|
|
144
|
-
};
|
|
145
|
-
export const de_StartDeviceAuthorizationCommand = async (output, context) => {
|
|
146
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
147
|
-
return de_CommandError(output, context);
|
|
148
|
-
}
|
|
149
|
-
const contents = map({
|
|
150
|
-
$metadata: deserializeMetadata(output),
|
|
151
|
-
});
|
|
152
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
153
|
-
const doc = take(data, {
|
|
154
|
-
deviceCode: __expectString,
|
|
155
|
-
expiresIn: __expectInt32,
|
|
156
|
-
interval: __expectInt32,
|
|
157
|
-
userCode: __expectString,
|
|
158
|
-
verificationUri: __expectString,
|
|
159
|
-
verificationUriComplete: __expectString,
|
|
160
|
-
});
|
|
161
|
-
Object.assign(contents, doc);
|
|
162
|
-
return contents;
|
|
163
|
-
};
|
|
164
|
-
const de_CommandError = async (output, context) => {
|
|
165
|
-
const parsedOutput = {
|
|
166
|
-
...output,
|
|
167
|
-
body: await parseErrorBody(output.body, context),
|
|
168
|
-
};
|
|
169
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
170
|
-
switch (errorCode) {
|
|
171
|
-
case "AccessDeniedException":
|
|
172
|
-
case "com.amazonaws.ssooidc#AccessDeniedException":
|
|
173
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
174
|
-
case "AuthorizationPendingException":
|
|
175
|
-
case "com.amazonaws.ssooidc#AuthorizationPendingException":
|
|
176
|
-
throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
|
|
177
|
-
case "ExpiredTokenException":
|
|
178
|
-
case "com.amazonaws.ssooidc#ExpiredTokenException":
|
|
179
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
|
180
|
-
case "InternalServerException":
|
|
181
|
-
case "com.amazonaws.ssooidc#InternalServerException":
|
|
182
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
183
|
-
case "InvalidClientException":
|
|
184
|
-
case "com.amazonaws.ssooidc#InvalidClientException":
|
|
185
|
-
throw await de_InvalidClientExceptionRes(parsedOutput, context);
|
|
186
|
-
case "InvalidGrantException":
|
|
187
|
-
case "com.amazonaws.ssooidc#InvalidGrantException":
|
|
188
|
-
throw await de_InvalidGrantExceptionRes(parsedOutput, context);
|
|
189
|
-
case "InvalidRequestException":
|
|
190
|
-
case "com.amazonaws.ssooidc#InvalidRequestException":
|
|
191
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
192
|
-
case "InvalidScopeException":
|
|
193
|
-
case "com.amazonaws.ssooidc#InvalidScopeException":
|
|
194
|
-
throw await de_InvalidScopeExceptionRes(parsedOutput, context);
|
|
195
|
-
case "SlowDownException":
|
|
196
|
-
case "com.amazonaws.ssooidc#SlowDownException":
|
|
197
|
-
throw await de_SlowDownExceptionRes(parsedOutput, context);
|
|
198
|
-
case "UnauthorizedClientException":
|
|
199
|
-
case "com.amazonaws.ssooidc#UnauthorizedClientException":
|
|
200
|
-
throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
|
|
201
|
-
case "UnsupportedGrantTypeException":
|
|
202
|
-
case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
|
|
203
|
-
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
|
|
204
|
-
case "InvalidRequestRegionException":
|
|
205
|
-
case "com.amazonaws.ssooidc#InvalidRequestRegionException":
|
|
206
|
-
throw await de_InvalidRequestRegionExceptionRes(parsedOutput, context);
|
|
207
|
-
case "InvalidClientMetadataException":
|
|
208
|
-
case "com.amazonaws.ssooidc#InvalidClientMetadataException":
|
|
209
|
-
throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context);
|
|
210
|
-
case "InvalidRedirectUriException":
|
|
211
|
-
case "com.amazonaws.ssooidc#InvalidRedirectUriException":
|
|
212
|
-
throw await de_InvalidRedirectUriExceptionRes(parsedOutput, context);
|
|
213
|
-
default:
|
|
214
|
-
const parsedBody = parsedOutput.body;
|
|
215
|
-
return throwDefaultError({
|
|
216
|
-
output,
|
|
217
|
-
parsedBody,
|
|
218
|
-
errorCode,
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
223
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
224
|
-
const contents = map({});
|
|
225
|
-
const data = parsedOutput.body;
|
|
226
|
-
const doc = take(data, {
|
|
227
|
-
error: __expectString,
|
|
228
|
-
error_description: __expectString,
|
|
229
|
-
reason: __expectString,
|
|
230
|
-
});
|
|
231
|
-
Object.assign(contents, doc);
|
|
232
|
-
const exception = new AccessDeniedException({
|
|
233
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
234
|
-
...contents,
|
|
235
|
-
});
|
|
236
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
237
|
-
};
|
|
238
|
-
const de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
|
|
239
|
-
const contents = map({});
|
|
240
|
-
const data = parsedOutput.body;
|
|
241
|
-
const doc = take(data, {
|
|
242
|
-
error: __expectString,
|
|
243
|
-
error_description: __expectString,
|
|
244
|
-
});
|
|
245
|
-
Object.assign(contents, doc);
|
|
246
|
-
const exception = new AuthorizationPendingException({
|
|
247
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
248
|
-
...contents,
|
|
249
|
-
});
|
|
250
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
251
|
-
};
|
|
252
|
-
const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
|
|
253
|
-
const contents = map({});
|
|
254
|
-
const data = parsedOutput.body;
|
|
255
|
-
const doc = take(data, {
|
|
256
|
-
error: __expectString,
|
|
257
|
-
error_description: __expectString,
|
|
258
|
-
});
|
|
259
|
-
Object.assign(contents, doc);
|
|
260
|
-
const exception = new ExpiredTokenException({
|
|
261
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
262
|
-
...contents,
|
|
263
|
-
});
|
|
264
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
265
|
-
};
|
|
266
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
267
|
-
const contents = map({});
|
|
268
|
-
const data = parsedOutput.body;
|
|
269
|
-
const doc = take(data, {
|
|
270
|
-
error: __expectString,
|
|
271
|
-
error_description: __expectString,
|
|
272
|
-
});
|
|
273
|
-
Object.assign(contents, doc);
|
|
274
|
-
const exception = new InternalServerException({
|
|
275
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
276
|
-
...contents,
|
|
277
|
-
});
|
|
278
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
279
|
-
};
|
|
280
|
-
const de_InvalidClientExceptionRes = async (parsedOutput, context) => {
|
|
281
|
-
const contents = map({});
|
|
282
|
-
const data = parsedOutput.body;
|
|
283
|
-
const doc = take(data, {
|
|
284
|
-
error: __expectString,
|
|
285
|
-
error_description: __expectString,
|
|
286
|
-
});
|
|
287
|
-
Object.assign(contents, doc);
|
|
288
|
-
const exception = new InvalidClientException({
|
|
289
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
290
|
-
...contents,
|
|
291
|
-
});
|
|
292
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
293
|
-
};
|
|
294
|
-
const de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => {
|
|
295
|
-
const contents = map({});
|
|
296
|
-
const data = parsedOutput.body;
|
|
297
|
-
const doc = take(data, {
|
|
298
|
-
error: __expectString,
|
|
299
|
-
error_description: __expectString,
|
|
300
|
-
});
|
|
301
|
-
Object.assign(contents, doc);
|
|
302
|
-
const exception = new InvalidClientMetadataException({
|
|
303
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
304
|
-
...contents,
|
|
305
|
-
});
|
|
306
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
307
|
-
};
|
|
308
|
-
const de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
|
|
309
|
-
const contents = map({});
|
|
310
|
-
const data = parsedOutput.body;
|
|
311
|
-
const doc = take(data, {
|
|
312
|
-
error: __expectString,
|
|
313
|
-
error_description: __expectString,
|
|
314
|
-
});
|
|
315
|
-
Object.assign(contents, doc);
|
|
316
|
-
const exception = new InvalidGrantException({
|
|
317
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
318
|
-
...contents,
|
|
319
|
-
});
|
|
320
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
321
|
-
};
|
|
322
|
-
const de_InvalidRedirectUriExceptionRes = async (parsedOutput, context) => {
|
|
323
|
-
const contents = map({});
|
|
324
|
-
const data = parsedOutput.body;
|
|
325
|
-
const doc = take(data, {
|
|
326
|
-
error: __expectString,
|
|
327
|
-
error_description: __expectString,
|
|
328
|
-
});
|
|
329
|
-
Object.assign(contents, doc);
|
|
330
|
-
const exception = new InvalidRedirectUriException({
|
|
331
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
332
|
-
...contents,
|
|
333
|
-
});
|
|
334
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
335
|
-
};
|
|
336
|
-
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
337
|
-
const contents = map({});
|
|
338
|
-
const data = parsedOutput.body;
|
|
339
|
-
const doc = take(data, {
|
|
340
|
-
error: __expectString,
|
|
341
|
-
error_description: __expectString,
|
|
342
|
-
reason: __expectString,
|
|
343
|
-
});
|
|
344
|
-
Object.assign(contents, doc);
|
|
345
|
-
const exception = new InvalidRequestException({
|
|
346
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
347
|
-
...contents,
|
|
348
|
-
});
|
|
349
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
350
|
-
};
|
|
351
|
-
const de_InvalidRequestRegionExceptionRes = async (parsedOutput, context) => {
|
|
352
|
-
const contents = map({});
|
|
353
|
-
const data = parsedOutput.body;
|
|
354
|
-
const doc = take(data, {
|
|
355
|
-
endpoint: __expectString,
|
|
356
|
-
error: __expectString,
|
|
357
|
-
error_description: __expectString,
|
|
358
|
-
region: __expectString,
|
|
359
|
-
});
|
|
360
|
-
Object.assign(contents, doc);
|
|
361
|
-
const exception = new InvalidRequestRegionException({
|
|
362
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
363
|
-
...contents,
|
|
364
|
-
});
|
|
365
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
366
|
-
};
|
|
367
|
-
const de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
|
|
368
|
-
const contents = map({});
|
|
369
|
-
const data = parsedOutput.body;
|
|
370
|
-
const doc = take(data, {
|
|
371
|
-
error: __expectString,
|
|
372
|
-
error_description: __expectString,
|
|
373
|
-
});
|
|
374
|
-
Object.assign(contents, doc);
|
|
375
|
-
const exception = new InvalidScopeException({
|
|
376
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
377
|
-
...contents,
|
|
378
|
-
});
|
|
379
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
380
|
-
};
|
|
381
|
-
const de_SlowDownExceptionRes = async (parsedOutput, context) => {
|
|
382
|
-
const contents = map({});
|
|
383
|
-
const data = parsedOutput.body;
|
|
384
|
-
const doc = take(data, {
|
|
385
|
-
error: __expectString,
|
|
386
|
-
error_description: __expectString,
|
|
387
|
-
});
|
|
388
|
-
Object.assign(contents, doc);
|
|
389
|
-
const exception = new SlowDownException({
|
|
390
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
391
|
-
...contents,
|
|
392
|
-
});
|
|
393
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
394
|
-
};
|
|
395
|
-
const de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
|
|
396
|
-
const contents = map({});
|
|
397
|
-
const data = parsedOutput.body;
|
|
398
|
-
const doc = take(data, {
|
|
399
|
-
error: __expectString,
|
|
400
|
-
error_description: __expectString,
|
|
401
|
-
});
|
|
402
|
-
Object.assign(contents, doc);
|
|
403
|
-
const exception = new UnauthorizedClientException({
|
|
404
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
405
|
-
...contents,
|
|
406
|
-
});
|
|
407
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
408
|
-
};
|
|
409
|
-
const de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => {
|
|
410
|
-
const contents = map({});
|
|
411
|
-
const data = parsedOutput.body;
|
|
412
|
-
const doc = take(data, {
|
|
413
|
-
error: __expectString,
|
|
414
|
-
error_description: __expectString,
|
|
415
|
-
});
|
|
416
|
-
Object.assign(contents, doc);
|
|
417
|
-
const exception = new UnsupportedGrantTypeException({
|
|
418
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
419
|
-
...contents,
|
|
420
|
-
});
|
|
421
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
422
|
-
};
|
|
423
|
-
const deserializeMetadata = (output) => ({
|
|
424
|
-
httpStatusCode: output.statusCode,
|
|
425
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
426
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
427
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
428
|
-
});
|
|
429
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
430
|
-
const _ai = "aws_iam";
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
2
|
-
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
3
|
-
import { CreateTokenCommandInput, CreateTokenCommandOutput } from "../commands/CreateTokenCommand";
|
|
4
|
-
import { CreateTokenWithIAMCommandInput, CreateTokenWithIAMCommandOutput } from "../commands/CreateTokenWithIAMCommand";
|
|
5
|
-
import { RegisterClientCommandInput, RegisterClientCommandOutput } from "../commands/RegisterClientCommand";
|
|
6
|
-
import { StartDeviceAuthorizationCommandInput, StartDeviceAuthorizationCommandOutput } from "../commands/StartDeviceAuthorizationCommand";
|
|
7
|
-
/**
|
|
8
|
-
* serializeAws_restJson1CreateTokenCommand
|
|
9
|
-
*/
|
|
10
|
-
export declare const se_CreateTokenCommand: (input: CreateTokenCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
11
|
-
/**
|
|
12
|
-
* serializeAws_restJson1CreateTokenWithIAMCommand
|
|
13
|
-
*/
|
|
14
|
-
export declare const se_CreateTokenWithIAMCommand: (input: CreateTokenWithIAMCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
15
|
-
/**
|
|
16
|
-
* serializeAws_restJson1RegisterClientCommand
|
|
17
|
-
*/
|
|
18
|
-
export declare const se_RegisterClientCommand: (input: RegisterClientCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
19
|
-
/**
|
|
20
|
-
* serializeAws_restJson1StartDeviceAuthorizationCommand
|
|
21
|
-
*/
|
|
22
|
-
export declare const se_StartDeviceAuthorizationCommand: (input: StartDeviceAuthorizationCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
23
|
-
/**
|
|
24
|
-
* deserializeAws_restJson1CreateTokenCommand
|
|
25
|
-
*/
|
|
26
|
-
export declare const de_CreateTokenCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CreateTokenCommandOutput>;
|
|
27
|
-
/**
|
|
28
|
-
* deserializeAws_restJson1CreateTokenWithIAMCommand
|
|
29
|
-
*/
|
|
30
|
-
export declare const de_CreateTokenWithIAMCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CreateTokenWithIAMCommandOutput>;
|
|
31
|
-
/**
|
|
32
|
-
* deserializeAws_restJson1RegisterClientCommand
|
|
33
|
-
*/
|
|
34
|
-
export declare const de_RegisterClientCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RegisterClientCommandOutput>;
|
|
35
|
-
/**
|
|
36
|
-
* deserializeAws_restJson1StartDeviceAuthorizationCommand
|
|
37
|
-
*/
|
|
38
|
-
export declare const de_StartDeviceAuthorizationCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<StartDeviceAuthorizationCommandOutput>;
|