Skip to content

Commit

Permalink
update noauth (#2945)
Browse files Browse the repository at this point in the history
  • Loading branch information
stobrien89 committed Jun 18, 2024
1 parent ea6cd3f commit a754e19
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .changes/nextrelease/multi-auth-updates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"type": "bugfix",
"category": "Auth",
"description": "Corrects an issue with modeling for `noAuth` auth types."
}
]
2 changes: 1 addition & 1 deletion src/Auth/AuthSchemeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
];

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/Auth/AuthSchemeResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function schemeForIdentityProvider()
'v4a'
],
[
['smithy.auth#noAuth'],
['smithy.api#noAuth'],
'anonymous'
],
];
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions tests/Auth/AuthSelectionMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function ResolvesAuthSchemeWithoutCRTProvider()
],
[
['aws.auth#sigv4', 'aws.auth#sigv4a'],
['smithy.auth#noAuth'],
['smithy.api#noAuth'],
'anonymous'
],
[
Expand Down Expand Up @@ -152,7 +152,7 @@ public function ResolvesAuthSchemeWithCRTprovider()
],
[
['aws.auth#sigv4', 'aws.auth#sigv4a'],
['smithy.auth#noAuth'],
['smithy.api#noAuth'],
'anonymous'
],
[
Expand Down

0 comments on commit a754e19

Please sign in to comment.