Skip to content

Commit

Permalink
Add additional HttpAuthScheme interfaces for auth scheme resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Yuan committed Sep 13, 2023
1 parent a6d5a23 commit 94a0c46
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-rabbits-collect.md
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
9 changes: 9 additions & 0 deletions packages/experimental-identity-and-auth/src/HttpAuthScheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,12 @@ export interface HttpAuthOption {
identityProperties?: Record<string, unknown>;
signingProperties?: Record<string, unknown>;
}

/**
* @internal
*/
export interface SelectedHttpAuthScheme {
httpAuthOption: HttpAuthOption;
identity: Identity;
signer: HttpSigner;
}
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>;
}
1 change: 1 addition & 0 deletions packages/experimental-identity-and-auth/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from "./HttpAuthScheme";
export * from "./HttpAuthSchemeProvider";
export * from "./HttpSigner";
export * from "./IdentityProviderConfig";
export * from "./SigV4Signer";
Expand Down

0 comments on commit 94a0c46

Please sign in to comment.