diff --git a/.changes/nextrelease/multi-auth-updates.json b/.changes/nextrelease/multi-auth-updates.json new file mode 100644 index 0000000000..f2ccb84995 --- /dev/null +++ b/.changes/nextrelease/multi-auth-updates.json @@ -0,0 +1,7 @@ +[ + { + "type": "bugfix", + "category": "Auth", + "description": "Corrects an issue with modeling for `noAuth` auth types." + } +] diff --git a/src/Auth/AuthSchemeResolver.php b/src/Auth/AuthSchemeResolver.php index 69f3ddb7c2..b477468094 100644 --- a/src/Auth/AuthSchemeResolver.php +++ b/src/Auth/AuthSchemeResolver.php @@ -23,7 +23,7 @@ class AuthSchemeResolver implements AuthSchemeResolverInterface 'aws.auth#sigv4' => 'v4', 'aws.auth#sigv4a' => 'v4a', 'smithy.api#httpBearerAuth' => 'bearer', - 'smithy.auth#noAuth' => 'anonymous' + 'smithy.api#noAuth' => 'anonymous' ]; /** diff --git a/tests/Auth/AuthSchemeResolverTest.php b/tests/Auth/AuthSchemeResolverTest.php index e57fbf8b16..5a05e67f76 100644 --- a/tests/Auth/AuthSchemeResolverTest.php +++ b/tests/Auth/AuthSchemeResolverTest.php @@ -83,7 +83,7 @@ public function schemeForIdentityProvider() 'v4a' ], [ - ['smithy.auth#noAuth'], + ['smithy.api#noAuth'], 'anonymous' ], ]; @@ -169,7 +169,7 @@ public function testMissingRequiredIdentityThrows() $tokenProvider = $credentialProvider; $resolver = new AuthSchemeResolver($credentialProvider, $tokenProvider); - $resolver->selectAuthScheme(['aws.auth#sigv4', 'smithy.auth#noAuth', 'smithy.api#httpBearerAuth']); + $resolver->selectAuthScheme(['aws.auth#sigv4', 'smithy.api#noAuth', 'smithy.api#httpBearerAuth']); } public function testUnmetV4aRequirementsThrows() diff --git a/tests/Auth/AuthSelectionMiddlewareTest.php b/tests/Auth/AuthSelectionMiddlewareTest.php index 9f58f9a49b..a73e15a1ed 100644 --- a/tests/Auth/AuthSelectionMiddlewareTest.php +++ b/tests/Auth/AuthSelectionMiddlewareTest.php @@ -85,7 +85,7 @@ public function ResolvesAuthSchemeWithoutCRTProvider() ], [ ['aws.auth#sigv4', 'aws.auth#sigv4a'], - ['smithy.auth#noAuth'], + ['smithy.api#noAuth'], 'anonymous' ], [ @@ -152,7 +152,7 @@ public function ResolvesAuthSchemeWithCRTprovider() ], [ ['aws.auth#sigv4', 'aws.auth#sigv4a'], - ['smithy.auth#noAuth'], + ['smithy.api#noAuth'], 'anonymous' ], [