-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional
HttpAuthScheme
interfaces for auth scheme resolution
- Loading branch information
Steven Yuan
committed
Sep 13, 2023
1 parent
a6d5a23
commit 94a0c46
Showing
4 changed files
with
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@smithy/experimental-identity-and-auth": patch | ||
--- | ||
|
||
Add additional `HttpAuthScheme` interfaces for auth scheme resolution |
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
27 changes: 27 additions & 0 deletions
27
packages/experimental-identity-and-auth/src/HttpAuthSchemeProvider.ts
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,27 @@ | ||
import { HandlerExecutionContext } from "@smithy/types"; | ||
|
||
import { HttpAuthOption } from "./HttpAuthScheme"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export interface HttpAuthSchemeParameters { | ||
operation?: string; | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export interface HttpAuthSchemeProvider<TParameters extends HttpAuthSchemeParameters = HttpAuthSchemeParameters> { | ||
(authParameters: TParameters): HttpAuthOption[]; | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export interface HttpAuthSchemeParametersProvider< | ||
C extends object = object, | ||
T extends HttpAuthSchemeParameters = HttpAuthSchemeParameters | ||
> { | ||
(config: C, context: HandlerExecutionContext): Promise<T>; | ||
} |
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