From b93d259afee45d2ddfdfb8cdc6403d8ae54e41f9 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Tue, 1 Dec 2020 00:53:32 +0000 Subject: [PATCH] chore(client-cognito-identity): remove disable auth customizations --- .../aws/typescript/codegen/AddBuiltinPlugins.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPlugins.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPlugins.java index 20fed31cf039..f4db8f115793 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPlugins.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPlugins.java @@ -67,10 +67,7 @@ public List getClientPlugins() { .withConventions(AwsDependency.MIDDLEWARE_SIGNING.dependency, "AwsAuth", HAS_MIDDLEWARE) // See operationUsesAwsAuth() below for AwsAuth Middleware customizations. .servicePredicate( - (m, s) -> - !testServiceId(s, "Cognito Identity") - && !testServiceId(s, "STS") - && !hasOptionalAuthOperation(m, s) + (m, s) -> !testServiceId(s, "STS") && !hasOptionalAuthOperation(m, s) ).build(), RuntimeClientPlugin.builder() .withConventions(TypeScriptDependency.MIDDLEWARE_RETRY.dependency, "Retry") @@ -169,15 +166,6 @@ private static boolean testServiceId(Shape serviceShape, String expectedId) { } private static boolean operationUsesAwsAuth(Model model, ServiceShape service, OperationShape operation) { - // Cognito Identity doesn't need auth for GetId, GetOpenIdToken, GetCredentialsForIdentity, UnlinkIdentity. - // Remove when optionalAuth model update is published in V261331976. - if (testServiceId(service, "Cognito Identity")) { - Boolean isUnsignedCommand = SetUtils - .of("GetId", "GetOpenIdToken", "GetCredentialsForIdentity", "UnlinkIdentity") - .contains(operation.getId().getName()); - return !isUnsignedCommand; - } - // STS doesn't need auth for AssumeRoleWithWebIdentity, AssumeRoleWithSAML. // Remove when optionalAuth model update is published in 0533102932. if (testServiceId(service, "STS")) {