@aws-sdk/client-sso-oidc 3.137.0 → 3.145.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/CHANGELOG.md +30 -0
- package/README.md +39 -17
- package/dist-cjs/protocols/Aws_restJson1.js +78 -106
- package/dist-es/protocols/Aws_restJson1.js +88 -107
- package/dist-types/SSOOIDC.d.ts +42 -19
- package/dist-types/SSOOIDCClient.d.ts +38 -16
- package/dist-types/commands/CreateTokenCommand.d.ts +1 -1
- package/dist-types/commands/RegisterClientCommand.d.ts +1 -1
- package/dist-types/commands/StartDeviceAuthorizationCommand.d.ts +2 -1
- package/dist-types/models/models_0.d.ts +55 -21
- package/package.json +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.145.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.144.0...v3.145.0) (2022-08-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-sso-oidc
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* **clients:** update client endpoints as of 2022-08-01 ([aaf49f2](https://github.com/aws/aws-sdk-js-v3/commit/aaf49f21b371412e6ea7e00890b71a7b31991b66))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
# [3.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
|
|
7
37
|
|
|
8
38
|
|
package/README.md
CHANGED
|
@@ -9,24 +9,46 @@
|
|
|
9
9
|
|
|
10
10
|
AWS SDK for JavaScript SSOOIDC Client for Node.js, Browser and React Native.
|
|
11
11
|
|
|
12
|
-
<p>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
the device authorization grant standard (<a href="https://tools.ietf.org/html/rfc8628">https://tools.ietf.org/html/rfc8628</a>).</p>
|
|
17
|
-
|
|
18
|
-
<p>For general information about AWS SSO, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html">What is AWS
|
|
19
|
-
Single Sign-On?</a> in the <i>AWS SSO User Guide</i>.</p>
|
|
20
|
-
|
|
21
|
-
<p>This API reference guide describes the AWS SSO OIDC operations that you can call
|
|
22
|
-
programatically and includes detailed information on data types and errors.</p>
|
|
23
|
-
|
|
12
|
+
<p>Amazon Web Services Single Sign On OpenID Connect (OIDC) is a web service that enables a client (such as Amazon Web Services CLI
|
|
13
|
+
or a native application) to register with Amazon Web Services SSO. The service also enables the client to
|
|
14
|
+
fetch the user’s access token upon successful authentication and authorization with
|
|
15
|
+
Amazon Web Services SSO.</p>
|
|
24
16
|
<note>
|
|
25
|
-
<p>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
information about the AWS SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
|
|
17
|
+
<p>Although Amazon Web Services Single Sign-On was renamed, the <code>sso</code> and
|
|
18
|
+
<code>identitystore</code> API namespaces will continue to retain their original name for
|
|
19
|
+
backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">Amazon Web Services SSO rename</a>.</p>
|
|
29
20
|
</note>
|
|
21
|
+
<p>
|
|
22
|
+
<b>Considerations for Using This Guide</b>
|
|
23
|
+
</p>
|
|
24
|
+
<p>Before you begin using this guide, we recommend that you first review the following
|
|
25
|
+
important information about how the Amazon Web Services SSO OIDC service works.</p>
|
|
26
|
+
<ul>
|
|
27
|
+
<li>
|
|
28
|
+
<p>The Amazon Web Services SSO OIDC service currently implements only the portions of the OAuth 2.0
|
|
29
|
+
Device Authorization Grant standard (<a href="https://tools.ietf.org/html/rfc8628">https://tools.ietf.org/html/rfc8628</a>) that are necessary to enable single
|
|
30
|
+
sign-on authentication with the AWS CLI. Support for other OIDC flows frequently needed
|
|
31
|
+
for native applications, such as Authorization Code Flow (+ PKCE), will be addressed in
|
|
32
|
+
future releases.</p>
|
|
33
|
+
</li>
|
|
34
|
+
<li>
|
|
35
|
+
<p>The service emits only OIDC access tokens, such that obtaining a new token (For
|
|
36
|
+
example, token refresh) requires explicit user re-authentication.</p>
|
|
37
|
+
</li>
|
|
38
|
+
<li>
|
|
39
|
+
<p>The access tokens provided by this service grant access to all AWS account
|
|
40
|
+
entitlements assigned to an Amazon Web Services SSO user, not just a particular application.</p>
|
|
41
|
+
</li>
|
|
42
|
+
<li>
|
|
43
|
+
<p>The documentation in this guide does not describe the mechanism to convert the access
|
|
44
|
+
token into AWS Auth (“sigv4”) credentials for use with IAM-protected AWS service
|
|
45
|
+
endpoints. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html">GetRoleCredentials</a> in the <i>Amazon Web Services SSO Portal API Reference
|
|
46
|
+
Guide</i>.</p>
|
|
47
|
+
</li>
|
|
48
|
+
</ul>
|
|
49
|
+
|
|
50
|
+
<p>For general information about Amazon Web Services SSO, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html">What is
|
|
51
|
+
Amazon Web Services SSO?</a> in the <i>Amazon Web Services SSO User Guide</i>.</p>
|
|
30
52
|
|
|
31
53
|
## Installing
|
|
32
54
|
|
|
@@ -182,7 +204,7 @@ try {
|
|
|
182
204
|
const data = await client.send(command);
|
|
183
205
|
// process data.
|
|
184
206
|
} catch (error) {
|
|
185
|
-
const { requestId, cfId, extendedRequestId } = error
|
|
207
|
+
const { requestId, cfId, extendedRequestId } = error.$$metadata;
|
|
186
208
|
console.log({ requestId, cfId, extendedRequestId });
|
|
187
209
|
/**
|
|
188
210
|
* The keys within exceptions are also parsed.
|
|
@@ -83,31 +83,26 @@ const deserializeAws_restJson1CreateTokenCommand = async (output, context) => {
|
|
|
83
83
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
84
84
|
return deserializeAws_restJson1CreateTokenCommandError(output, context);
|
|
85
85
|
}
|
|
86
|
-
const contents = {
|
|
86
|
+
const contents = map({
|
|
87
87
|
$metadata: deserializeMetadata(output),
|
|
88
|
-
|
|
89
|
-
expiresIn: undefined,
|
|
90
|
-
idToken: undefined,
|
|
91
|
-
refreshToken: undefined,
|
|
92
|
-
tokenType: undefined,
|
|
93
|
-
};
|
|
88
|
+
});
|
|
94
89
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
95
|
-
if (data.accessToken
|
|
90
|
+
if (data.accessToken != null) {
|
|
96
91
|
contents.accessToken = (0, smithy_client_1.expectString)(data.accessToken);
|
|
97
92
|
}
|
|
98
|
-
if (data.expiresIn
|
|
93
|
+
if (data.expiresIn != null) {
|
|
99
94
|
contents.expiresIn = (0, smithy_client_1.expectInt32)(data.expiresIn);
|
|
100
95
|
}
|
|
101
|
-
if (data.idToken
|
|
96
|
+
if (data.idToken != null) {
|
|
102
97
|
contents.idToken = (0, smithy_client_1.expectString)(data.idToken);
|
|
103
98
|
}
|
|
104
|
-
if (data.refreshToken
|
|
99
|
+
if (data.refreshToken != null) {
|
|
105
100
|
contents.refreshToken = (0, smithy_client_1.expectString)(data.refreshToken);
|
|
106
101
|
}
|
|
107
|
-
if (data.tokenType
|
|
102
|
+
if (data.tokenType != null) {
|
|
108
103
|
contents.tokenType = (0, smithy_client_1.expectString)(data.tokenType);
|
|
109
104
|
}
|
|
110
|
-
return
|
|
105
|
+
return contents;
|
|
111
106
|
};
|
|
112
107
|
exports.deserializeAws_restJson1CreateTokenCommand = deserializeAws_restJson1CreateTokenCommand;
|
|
113
108
|
const deserializeAws_restJson1CreateTokenCommandError = async (output, context) => {
|
|
@@ -115,7 +110,6 @@ const deserializeAws_restJson1CreateTokenCommandError = async (output, context)
|
|
|
115
110
|
...output,
|
|
116
111
|
body: await parseBody(output.body, context),
|
|
117
112
|
};
|
|
118
|
-
let response;
|
|
119
113
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
120
114
|
switch (errorCode) {
|
|
121
115
|
case "AccessDeniedException":
|
|
@@ -153,49 +147,41 @@ const deserializeAws_restJson1CreateTokenCommandError = async (output, context)
|
|
|
153
147
|
throw await deserializeAws_restJson1UnsupportedGrantTypeExceptionResponse(parsedOutput, context);
|
|
154
148
|
default:
|
|
155
149
|
const parsedBody = parsedOutput.body;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
$metadata,
|
|
150
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
151
|
+
output,
|
|
152
|
+
parsedBody,
|
|
153
|
+
exceptionCtor: SSOOIDCServiceException_1.SSOOIDCServiceException,
|
|
154
|
+
errorCode,
|
|
162
155
|
});
|
|
163
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
164
156
|
}
|
|
165
157
|
};
|
|
166
158
|
const deserializeAws_restJson1RegisterClientCommand = async (output, context) => {
|
|
167
159
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
168
160
|
return deserializeAws_restJson1RegisterClientCommandError(output, context);
|
|
169
161
|
}
|
|
170
|
-
const contents = {
|
|
162
|
+
const contents = map({
|
|
171
163
|
$metadata: deserializeMetadata(output),
|
|
172
|
-
|
|
173
|
-
clientId: undefined,
|
|
174
|
-
clientIdIssuedAt: undefined,
|
|
175
|
-
clientSecret: undefined,
|
|
176
|
-
clientSecretExpiresAt: undefined,
|
|
177
|
-
tokenEndpoint: undefined,
|
|
178
|
-
};
|
|
164
|
+
});
|
|
179
165
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
180
|
-
if (data.authorizationEndpoint
|
|
166
|
+
if (data.authorizationEndpoint != null) {
|
|
181
167
|
contents.authorizationEndpoint = (0, smithy_client_1.expectString)(data.authorizationEndpoint);
|
|
182
168
|
}
|
|
183
|
-
if (data.clientId
|
|
169
|
+
if (data.clientId != null) {
|
|
184
170
|
contents.clientId = (0, smithy_client_1.expectString)(data.clientId);
|
|
185
171
|
}
|
|
186
|
-
if (data.clientIdIssuedAt
|
|
172
|
+
if (data.clientIdIssuedAt != null) {
|
|
187
173
|
contents.clientIdIssuedAt = (0, smithy_client_1.expectLong)(data.clientIdIssuedAt);
|
|
188
174
|
}
|
|
189
|
-
if (data.clientSecret
|
|
175
|
+
if (data.clientSecret != null) {
|
|
190
176
|
contents.clientSecret = (0, smithy_client_1.expectString)(data.clientSecret);
|
|
191
177
|
}
|
|
192
|
-
if (data.clientSecretExpiresAt
|
|
178
|
+
if (data.clientSecretExpiresAt != null) {
|
|
193
179
|
contents.clientSecretExpiresAt = (0, smithy_client_1.expectLong)(data.clientSecretExpiresAt);
|
|
194
180
|
}
|
|
195
|
-
if (data.tokenEndpoint
|
|
181
|
+
if (data.tokenEndpoint != null) {
|
|
196
182
|
contents.tokenEndpoint = (0, smithy_client_1.expectString)(data.tokenEndpoint);
|
|
197
183
|
}
|
|
198
|
-
return
|
|
184
|
+
return contents;
|
|
199
185
|
};
|
|
200
186
|
exports.deserializeAws_restJson1RegisterClientCommand = deserializeAws_restJson1RegisterClientCommand;
|
|
201
187
|
const deserializeAws_restJson1RegisterClientCommandError = async (output, context) => {
|
|
@@ -203,7 +189,6 @@ const deserializeAws_restJson1RegisterClientCommandError = async (output, contex
|
|
|
203
189
|
...output,
|
|
204
190
|
body: await parseBody(output.body, context),
|
|
205
191
|
};
|
|
206
|
-
let response;
|
|
207
192
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
208
193
|
switch (errorCode) {
|
|
209
194
|
case "InternalServerException":
|
|
@@ -220,49 +205,41 @@ const deserializeAws_restJson1RegisterClientCommandError = async (output, contex
|
|
|
220
205
|
throw await deserializeAws_restJson1InvalidScopeExceptionResponse(parsedOutput, context);
|
|
221
206
|
default:
|
|
222
207
|
const parsedBody = parsedOutput.body;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
$metadata,
|
|
208
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
209
|
+
output,
|
|
210
|
+
parsedBody,
|
|
211
|
+
exceptionCtor: SSOOIDCServiceException_1.SSOOIDCServiceException,
|
|
212
|
+
errorCode,
|
|
229
213
|
});
|
|
230
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
231
214
|
}
|
|
232
215
|
};
|
|
233
216
|
const deserializeAws_restJson1StartDeviceAuthorizationCommand = async (output, context) => {
|
|
234
217
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
235
218
|
return deserializeAws_restJson1StartDeviceAuthorizationCommandError(output, context);
|
|
236
219
|
}
|
|
237
|
-
const contents = {
|
|
220
|
+
const contents = map({
|
|
238
221
|
$metadata: deserializeMetadata(output),
|
|
239
|
-
|
|
240
|
-
expiresIn: undefined,
|
|
241
|
-
interval: undefined,
|
|
242
|
-
userCode: undefined,
|
|
243
|
-
verificationUri: undefined,
|
|
244
|
-
verificationUriComplete: undefined,
|
|
245
|
-
};
|
|
222
|
+
});
|
|
246
223
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
247
|
-
if (data.deviceCode
|
|
224
|
+
if (data.deviceCode != null) {
|
|
248
225
|
contents.deviceCode = (0, smithy_client_1.expectString)(data.deviceCode);
|
|
249
226
|
}
|
|
250
|
-
if (data.expiresIn
|
|
227
|
+
if (data.expiresIn != null) {
|
|
251
228
|
contents.expiresIn = (0, smithy_client_1.expectInt32)(data.expiresIn);
|
|
252
229
|
}
|
|
253
|
-
if (data.interval
|
|
230
|
+
if (data.interval != null) {
|
|
254
231
|
contents.interval = (0, smithy_client_1.expectInt32)(data.interval);
|
|
255
232
|
}
|
|
256
|
-
if (data.userCode
|
|
233
|
+
if (data.userCode != null) {
|
|
257
234
|
contents.userCode = (0, smithy_client_1.expectString)(data.userCode);
|
|
258
235
|
}
|
|
259
|
-
if (data.verificationUri
|
|
236
|
+
if (data.verificationUri != null) {
|
|
260
237
|
contents.verificationUri = (0, smithy_client_1.expectString)(data.verificationUri);
|
|
261
238
|
}
|
|
262
|
-
if (data.verificationUriComplete
|
|
239
|
+
if (data.verificationUriComplete != null) {
|
|
263
240
|
contents.verificationUriComplete = (0, smithy_client_1.expectString)(data.verificationUriComplete);
|
|
264
241
|
}
|
|
265
|
-
return
|
|
242
|
+
return contents;
|
|
266
243
|
};
|
|
267
244
|
exports.deserializeAws_restJson1StartDeviceAuthorizationCommand = deserializeAws_restJson1StartDeviceAuthorizationCommand;
|
|
268
245
|
const deserializeAws_restJson1StartDeviceAuthorizationCommandError = async (output, context) => {
|
|
@@ -270,7 +247,6 @@ const deserializeAws_restJson1StartDeviceAuthorizationCommandError = async (outp
|
|
|
270
247
|
...output,
|
|
271
248
|
body: await parseBody(output.body, context),
|
|
272
249
|
};
|
|
273
|
-
let response;
|
|
274
250
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
275
251
|
switch (errorCode) {
|
|
276
252
|
case "InternalServerException":
|
|
@@ -290,23 +266,22 @@ const deserializeAws_restJson1StartDeviceAuthorizationCommandError = async (outp
|
|
|
290
266
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
291
267
|
default:
|
|
292
268
|
const parsedBody = parsedOutput.body;
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
$metadata,
|
|
269
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
270
|
+
output,
|
|
271
|
+
parsedBody,
|
|
272
|
+
exceptionCtor: SSOOIDCServiceException_1.SSOOIDCServiceException,
|
|
273
|
+
errorCode,
|
|
299
274
|
});
|
|
300
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
301
275
|
}
|
|
302
276
|
};
|
|
277
|
+
const map = smithy_client_1.map;
|
|
303
278
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
304
|
-
const contents = {};
|
|
279
|
+
const contents = map({});
|
|
305
280
|
const data = parsedOutput.body;
|
|
306
|
-
if (data.error
|
|
281
|
+
if (data.error != null) {
|
|
307
282
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
308
283
|
}
|
|
309
|
-
if (data.error_description
|
|
284
|
+
if (data.error_description != null) {
|
|
310
285
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
311
286
|
}
|
|
312
287
|
const exception = new models_0_1.AccessDeniedException({
|
|
@@ -316,12 +291,12 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
|
|
|
316
291
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
317
292
|
};
|
|
318
293
|
const deserializeAws_restJson1AuthorizationPendingExceptionResponse = async (parsedOutput, context) => {
|
|
319
|
-
const contents = {};
|
|
294
|
+
const contents = map({});
|
|
320
295
|
const data = parsedOutput.body;
|
|
321
|
-
if (data.error
|
|
296
|
+
if (data.error != null) {
|
|
322
297
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
323
298
|
}
|
|
324
|
-
if (data.error_description
|
|
299
|
+
if (data.error_description != null) {
|
|
325
300
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
326
301
|
}
|
|
327
302
|
const exception = new models_0_1.AuthorizationPendingException({
|
|
@@ -331,12 +306,12 @@ const deserializeAws_restJson1AuthorizationPendingExceptionResponse = async (par
|
|
|
331
306
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
332
307
|
};
|
|
333
308
|
const deserializeAws_restJson1ExpiredTokenExceptionResponse = async (parsedOutput, context) => {
|
|
334
|
-
const contents = {};
|
|
309
|
+
const contents = map({});
|
|
335
310
|
const data = parsedOutput.body;
|
|
336
|
-
if (data.error
|
|
311
|
+
if (data.error != null) {
|
|
337
312
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
338
313
|
}
|
|
339
|
-
if (data.error_description
|
|
314
|
+
if (data.error_description != null) {
|
|
340
315
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
341
316
|
}
|
|
342
317
|
const exception = new models_0_1.ExpiredTokenException({
|
|
@@ -346,12 +321,12 @@ const deserializeAws_restJson1ExpiredTokenExceptionResponse = async (parsedOutpu
|
|
|
346
321
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
347
322
|
};
|
|
348
323
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
349
|
-
const contents = {};
|
|
324
|
+
const contents = map({});
|
|
350
325
|
const data = parsedOutput.body;
|
|
351
|
-
if (data.error
|
|
326
|
+
if (data.error != null) {
|
|
352
327
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
353
328
|
}
|
|
354
|
-
if (data.error_description
|
|
329
|
+
if (data.error_description != null) {
|
|
355
330
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
356
331
|
}
|
|
357
332
|
const exception = new models_0_1.InternalServerException({
|
|
@@ -361,12 +336,12 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
361
336
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
362
337
|
};
|
|
363
338
|
const deserializeAws_restJson1InvalidClientExceptionResponse = async (parsedOutput, context) => {
|
|
364
|
-
const contents = {};
|
|
339
|
+
const contents = map({});
|
|
365
340
|
const data = parsedOutput.body;
|
|
366
|
-
if (data.error
|
|
341
|
+
if (data.error != null) {
|
|
367
342
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
368
343
|
}
|
|
369
|
-
if (data.error_description
|
|
344
|
+
if (data.error_description != null) {
|
|
370
345
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
371
346
|
}
|
|
372
347
|
const exception = new models_0_1.InvalidClientException({
|
|
@@ -376,12 +351,12 @@ const deserializeAws_restJson1InvalidClientExceptionResponse = async (parsedOutp
|
|
|
376
351
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
377
352
|
};
|
|
378
353
|
const deserializeAws_restJson1InvalidClientMetadataExceptionResponse = async (parsedOutput, context) => {
|
|
379
|
-
const contents = {};
|
|
354
|
+
const contents = map({});
|
|
380
355
|
const data = parsedOutput.body;
|
|
381
|
-
if (data.error
|
|
356
|
+
if (data.error != null) {
|
|
382
357
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
383
358
|
}
|
|
384
|
-
if (data.error_description
|
|
359
|
+
if (data.error_description != null) {
|
|
385
360
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
386
361
|
}
|
|
387
362
|
const exception = new models_0_1.InvalidClientMetadataException({
|
|
@@ -391,12 +366,12 @@ const deserializeAws_restJson1InvalidClientMetadataExceptionResponse = async (pa
|
|
|
391
366
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
392
367
|
};
|
|
393
368
|
const deserializeAws_restJson1InvalidGrantExceptionResponse = async (parsedOutput, context) => {
|
|
394
|
-
const contents = {};
|
|
369
|
+
const contents = map({});
|
|
395
370
|
const data = parsedOutput.body;
|
|
396
|
-
if (data.error
|
|
371
|
+
if (data.error != null) {
|
|
397
372
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
398
373
|
}
|
|
399
|
-
if (data.error_description
|
|
374
|
+
if (data.error_description != null) {
|
|
400
375
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
401
376
|
}
|
|
402
377
|
const exception = new models_0_1.InvalidGrantException({
|
|
@@ -406,12 +381,12 @@ const deserializeAws_restJson1InvalidGrantExceptionResponse = async (parsedOutpu
|
|
|
406
381
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
407
382
|
};
|
|
408
383
|
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
409
|
-
const contents = {};
|
|
384
|
+
const contents = map({});
|
|
410
385
|
const data = parsedOutput.body;
|
|
411
|
-
if (data.error
|
|
386
|
+
if (data.error != null) {
|
|
412
387
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
413
388
|
}
|
|
414
|
-
if (data.error_description
|
|
389
|
+
if (data.error_description != null) {
|
|
415
390
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
416
391
|
}
|
|
417
392
|
const exception = new models_0_1.InvalidRequestException({
|
|
@@ -421,12 +396,12 @@ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOut
|
|
|
421
396
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
422
397
|
};
|
|
423
398
|
const deserializeAws_restJson1InvalidScopeExceptionResponse = async (parsedOutput, context) => {
|
|
424
|
-
const contents = {};
|
|
399
|
+
const contents = map({});
|
|
425
400
|
const data = parsedOutput.body;
|
|
426
|
-
if (data.error
|
|
401
|
+
if (data.error != null) {
|
|
427
402
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
428
403
|
}
|
|
429
|
-
if (data.error_description
|
|
404
|
+
if (data.error_description != null) {
|
|
430
405
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
431
406
|
}
|
|
432
407
|
const exception = new models_0_1.InvalidScopeException({
|
|
@@ -436,12 +411,12 @@ const deserializeAws_restJson1InvalidScopeExceptionResponse = async (parsedOutpu
|
|
|
436
411
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
437
412
|
};
|
|
438
413
|
const deserializeAws_restJson1SlowDownExceptionResponse = async (parsedOutput, context) => {
|
|
439
|
-
const contents = {};
|
|
414
|
+
const contents = map({});
|
|
440
415
|
const data = parsedOutput.body;
|
|
441
|
-
if (data.error
|
|
416
|
+
if (data.error != null) {
|
|
442
417
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
443
418
|
}
|
|
444
|
-
if (data.error_description
|
|
419
|
+
if (data.error_description != null) {
|
|
445
420
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
446
421
|
}
|
|
447
422
|
const exception = new models_0_1.SlowDownException({
|
|
@@ -451,12 +426,12 @@ const deserializeAws_restJson1SlowDownExceptionResponse = async (parsedOutput, c
|
|
|
451
426
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
452
427
|
};
|
|
453
428
|
const deserializeAws_restJson1UnauthorizedClientExceptionResponse = async (parsedOutput, context) => {
|
|
454
|
-
const contents = {};
|
|
429
|
+
const contents = map({});
|
|
455
430
|
const data = parsedOutput.body;
|
|
456
|
-
if (data.error
|
|
431
|
+
if (data.error != null) {
|
|
457
432
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
458
433
|
}
|
|
459
|
-
if (data.error_description
|
|
434
|
+
if (data.error_description != null) {
|
|
460
435
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
461
436
|
}
|
|
462
437
|
const exception = new models_0_1.UnauthorizedClientException({
|
|
@@ -466,12 +441,12 @@ const deserializeAws_restJson1UnauthorizedClientExceptionResponse = async (parse
|
|
|
466
441
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
467
442
|
};
|
|
468
443
|
const deserializeAws_restJson1UnsupportedGrantTypeExceptionResponse = async (parsedOutput, context) => {
|
|
469
|
-
const contents = {};
|
|
444
|
+
const contents = map({});
|
|
470
445
|
const data = parsedOutput.body;
|
|
471
|
-
if (data.error
|
|
446
|
+
if (data.error != null) {
|
|
472
447
|
contents.error = (0, smithy_client_1.expectString)(data.error);
|
|
473
448
|
}
|
|
474
|
-
if (data.error_description
|
|
449
|
+
if (data.error_description != null) {
|
|
475
450
|
contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
|
|
476
451
|
}
|
|
477
452
|
const exception = new models_0_1.UnsupportedGrantTypeException({
|
|
@@ -484,9 +459,6 @@ const serializeAws_restJson1Scopes = (input, context) => {
|
|
|
484
459
|
return input
|
|
485
460
|
.filter((e) => e != null)
|
|
486
461
|
.map((entry) => {
|
|
487
|
-
if (entry === null) {
|
|
488
|
-
return null;
|
|
489
|
-
}
|
|
490
462
|
return entry;
|
|
491
463
|
});
|
|
492
464
|
};
|