Skip to content

Commit 785272b

Browse files
authored
fix(codegen): skip awsAuthPlugin when optionalAuth trait is set (#1622)
1 parent e1172ec commit 785272b

File tree

88 files changed

+192
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+192
-16
lines changed

clients/client-cognito-identity-provider/CognitoIdentityProviderClient.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,7 @@ import {
284284
} from "@aws-sdk/middleware-host-header";
285285
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
286286
import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
287-
import {
288-
AwsAuthInputConfig,
289-
AwsAuthResolvedConfig,
290-
getAwsAuthPlugin,
291-
resolveAwsAuthConfig,
292-
} from "@aws-sdk/middleware-signing";
287+
import { AwsAuthInputConfig, AwsAuthResolvedConfig, resolveAwsAuthConfig } from "@aws-sdk/middleware-signing";
293288
import {
294289
UserAgentInputConfig,
295290
UserAgentResolvedConfig,
@@ -660,7 +655,6 @@ export class CognitoIdentityProviderClient extends __Client<
660655
let _config_6 = resolveHostHeaderConfig(_config_5);
661656
super(_config_6);
662657
this.config = _config_6;
663-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
664658
this.middlewareStack.use(getRetryPlugin(this.config));
665659
this.middlewareStack.use(getUserAgentPlugin(this.config));
666660
this.middlewareStack.use(getContentLengthPlugin(this.config));

clients/client-cognito-identity-provider/commands/AddCustomAttributesCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
serializeAws_json1_1AddCustomAttributesCommand,
1010
} from "../protocols/Aws_json1_1";
1111
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
12+
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
1213
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
1314
import { Command as $Command } from "@aws-sdk/smithy-client";
1415
import {
@@ -44,6 +45,7 @@ export class AddCustomAttributesCommand extends $Command<
4445
options?: __HttpHandlerOptions
4546
): Handler<AddCustomAttributesCommandInput, AddCustomAttributesCommandOutput> {
4647
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
48+
this.middlewareStack.use(getAwsAuthPlugin(configuration));
4749

4850
const stack = clientStack.concat(this.middlewareStack);
4951

clients/client-cognito-identity-provider/commands/AdminAddUserToGroupCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
serializeAws_json1_1AdminAddUserToGroupCommand,
1010
} from "../protocols/Aws_json1_1";
1111
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
12+
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
1213
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
1314
import { Command as $Command } from "@aws-sdk/smithy-client";
1415
import {
@@ -44,6 +45,7 @@ export class AdminAddUserToGroupCommand extends $Command<
4445
options?: __HttpHandlerOptions
4546
): Handler<AdminAddUserToGroupCommandInput, AdminAddUserToGroupCommandOutput> {
4647
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
48+
this.middlewareStack.use(getAwsAuthPlugin(configuration));
4749

4850
const stack = clientStack.concat(this.middlewareStack);
4951

clients/client-cognito-identity-provider/commands/AdminConfirmSignUpCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
serializeAws_json1_1AdminConfirmSignUpCommand,
1010
} from "../protocols/Aws_json1_1";
1111
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
12+
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
1213
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
1314
import { Command as $Command } from "@aws-sdk/smithy-client";
1415
import {
@@ -44,6 +45,7 @@ export class AdminConfirmSignUpCommand extends $Command<
4445
options?: __HttpHandlerOptions
4546
): Handler<AdminConfirmSignUpCommandInput, AdminConfirmSignUpCommandOutput> {
4647
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
48+
this.middlewareStack.use(getAwsAuthPlugin(configuration));
4749

4850
const stack = clientStack.concat(this.middlewareStack);
4951

clients/client-cognito-identity-provider/commands/AdminCreateUserCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
serializeAws_json1_1AdminCreateUserCommand,
1010
} from "../protocols/Aws_json1_1";
1111
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
12+
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
1213
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
1314
import { Command as $Command } from "@aws-sdk/smithy-client";
1415
import {
@@ -44,6 +45,7 @@ export class AdminCreateUserCommand extends $Command<
4445
options?: __HttpHandlerOptions
4546
): Handler<AdminCreateUserCommandInput, AdminCreateUserCommandOutput> {
4647
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
48+
this.middlewareStack.use(getAwsAuthPlugin(configuration));
4749

4850
const stack = clientStack.concat(this.middlewareStack);
4951

clients/client-cognito-identity-provider/commands/AdminDeleteUserAttributesCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
serializeAws_json1_1AdminDeleteUserAttributesCommand,
1010
} from "../protocols/Aws_json1_1";
1111
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
12+
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
1213
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
1314
import { Command as $Command } from "@aws-sdk/smithy-client";
1415
import {
@@ -44,6 +45,7 @@ export class AdminDeleteUserAttributesCommand extends $Command<
4445
options?: __HttpHandlerOptions
4546
): Handler<AdminDeleteUserAttributesCommandInput, AdminDeleteUserAttributesCommandOutput> {
4647
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
48+
this.middlewareStack.use(getAwsAuthPlugin(configuration));
4749

4850
const stack = clientStack.concat(this.middlewareStack);
4951

clients/client-cognito-identity-provider/commands/AdminDeleteUserCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
serializeAws_json1_1AdminDeleteUserCommand,
1010
} from "../protocols/Aws_json1_1";
1111
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
12+
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
1213
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
1314
import { Command as $Command } from "@aws-sdk/smithy-client";
1415
import {
@@ -44,6 +45,7 @@ export class AdminDeleteUserCommand extends $Command<
4445
options?: __HttpHandlerOptions
4546
): Handler<AdminDeleteUserCommandInput, AdminDeleteUserCommandOutput> {
4647
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
48+
this.middlewareStack.use(getAwsAuthPlugin(configuration));
4749

4850
const stack = clientStack.concat(this.middlewareStack);
4951

clients/client-cognito-identity-provider/commands/AdminDisableProviderForUserCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
serializeAws_json1_1AdminDisableProviderForUserCommand,
1010
} from "../protocols/Aws_json1_1";
1111
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
12+
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
1213
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
1314
import { Command as $Command } from "@aws-sdk/smithy-client";
1415
import {
@@ -44,6 +45,7 @@ export class AdminDisableProviderForUserCommand extends $Command<
4445
options?: __HttpHandlerOptions
4546
): Handler<AdminDisableProviderForUserCommandInput, AdminDisableProviderForUserCommandOutput> {
4647
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
48+
this.middlewareStack.use(getAwsAuthPlugin(configuration));
4749

4850
const stack = clientStack.concat(this.middlewareStack);
4951

clients/client-cognito-identity-provider/commands/AdminDisableUserCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
serializeAws_json1_1AdminDisableUserCommand,
1010
} from "../protocols/Aws_json1_1";
1111
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
12+
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
1213
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
1314
import { Command as $Command } from "@aws-sdk/smithy-client";
1415
import {
@@ -44,6 +45,7 @@ export class AdminDisableUserCommand extends $Command<
4445
options?: __HttpHandlerOptions
4546
): Handler<AdminDisableUserCommandInput, AdminDisableUserCommandOutput> {
4647
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
48+
this.middlewareStack.use(getAwsAuthPlugin(configuration));
4749

4850
const stack = clientStack.concat(this.middlewareStack);
4951

clients/client-cognito-identity-provider/commands/AdminEnableUserCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
serializeAws_json1_1AdminEnableUserCommand,
1010
} from "../protocols/Aws_json1_1";
1111
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
12+
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
1213
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
1314
import { Command as $Command } from "@aws-sdk/smithy-client";
1415
import {
@@ -44,6 +45,7 @@ export class AdminEnableUserCommand extends $Command<
4445
options?: __HttpHandlerOptions
4546
): Handler<AdminEnableUserCommandInput, AdminEnableUserCommandOutput> {
4647
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
48+
this.middlewareStack.use(getAwsAuthPlugin(configuration));
4749

4850
const stack = clientStack.concat(this.middlewareStack);
4951

0 commit comments

Comments
 (0)