-
Notifications
You must be signed in to change notification settings - Fork 583
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(experimentalIdentityAndAuth): copy smithy-typescript generic aut…
…h tests
- Loading branch information
Steven Yuan
committed
Sep 8, 2023
1 parent
ce753f2
commit 3e1ec40
Showing
3 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
$version: "2.0" | ||
|
||
namespace example.weather | ||
|
||
use aws.auth#sigv4 | ||
|
||
@authDefinition | ||
@trait | ||
structure customAuth {} | ||
|
||
@trait | ||
@protocolDefinition | ||
structure fakeProtocol {} | ||
|
||
@fakeProtocol | ||
@httpApiKeyAuth(name: "X-Api-Key", in: "header") | ||
@httpBearerAuth | ||
@sigv4(name: "weather") | ||
@customAuth | ||
@auth([sigv4]) | ||
service Weather { | ||
version: "2006-03-01" | ||
operations: [ | ||
// experimentalIdentityAndAuth | ||
OnlyHttpApiKeyAuth | ||
OnlyHttpApiKeyAuthOptional | ||
OnlyHttpBearerAuth | ||
OnlyHttpBearerAuthOptional | ||
OnlyHttpApiKeyAndBearerAuth | ||
OnlyHttpApiKeyAndBearerAuthReversed | ||
OnlySigv4Auth | ||
OnlySigv4AuthOptional | ||
OnlyCustomAuth | ||
OnlyCustomAuthOptional | ||
SameAsService | ||
] | ||
} | ||
|
||
@http(method: "GET", uri: "/OnlyHttpApiKeyAuth") | ||
@auth([httpApiKeyAuth]) | ||
operation OnlyHttpApiKeyAuth {} | ||
|
||
@http(method: "GET", uri: "/OnlyHttpBearerAuth") | ||
@auth([httpBearerAuth]) | ||
operation OnlyHttpBearerAuth {} | ||
|
||
@http(method: "GET", uri: "/OnlySigv4Auth") | ||
@auth([sigv4]) | ||
operation OnlySigv4Auth {} | ||
|
||
@http(method: "GET", uri: "/OnlyHttpApiKeyAndBearerAuth") | ||
@auth([httpApiKeyAuth, httpBearerAuth]) | ||
operation OnlyHttpApiKeyAndBearerAuth {} | ||
|
||
@http(method: "GET", uri: "/OnlyHttpApiKeyAndBearerAuthReversed") | ||
@auth([httpBearerAuth, httpApiKeyAuth]) | ||
operation OnlyHttpApiKeyAndBearerAuthReversed {} | ||
|
||
@http(method: "GET", uri: "/OnlyHttpApiKeyAuthOptional") | ||
@auth([httpApiKeyAuth]) | ||
@optionalAuth | ||
operation OnlyHttpApiKeyAuthOptional {} | ||
|
||
@http(method: "GET", uri: "/OnlyHttpBearerAuthOptional") | ||
@auth([httpBearerAuth]) | ||
@optionalAuth | ||
operation OnlyHttpBearerAuthOptional {} | ||
|
||
@http(method: "GET", uri: "/OnlySigv4AuthOptional") | ||
@auth([sigv4]) | ||
@optionalAuth | ||
operation OnlySigv4AuthOptional {} | ||
|
||
@http(method: "GET", uri: "/OnlyCustomAuth") | ||
@auth([customAuth]) | ||
operation OnlyCustomAuth {} | ||
|
||
@http(method: "GET", uri: "/OnlyCustomAuthOptional") | ||
@auth([customAuth]) | ||
@optionalAuth | ||
operation OnlyCustomAuthOptional {} | ||
|
||
@http(method: "GET", uri: "/SameAsService") | ||
operation SameAsService {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters