Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
49 lines
1.5 KiB
Text
49 lines
1.5 KiB
Text
import { Identity, IdentityProvider } from "../identity/identity";
|
|
import { HandlerExecutionContext } from "../middleware";
|
|
import { HttpSigner } from "./HttpSigner";
|
|
import { IdentityProviderConfig } from "./IdentityProviderConfig";
|
|
/**
|
|
* ID for {@link HttpAuthScheme}
|
|
* @internal
|
|
*/
|
|
export type HttpAuthSchemeId = string;
|
|
/**
|
|
* Interface that defines an HttpAuthScheme
|
|
* @internal
|
|
*/
|
|
export interface HttpAuthScheme {
|
|
/**
|
|
* ID for an HttpAuthScheme, typically the absolute shape ID of a Smithy auth trait.
|
|
*/
|
|
schemeId: HttpAuthSchemeId;
|
|
/**
|
|
* Gets the IdentityProvider corresponding to an HttpAuthScheme.
|
|
*/
|
|
identityProvider(config: IdentityProviderConfig): IdentityProvider<Identity> | undefined;
|
|
/**
|
|
* HttpSigner corresponding to an HttpAuthScheme.
|
|
*/
|
|
signer: HttpSigner;
|
|
}
|
|
/**
|
|
* Interface that defines the identity and signing properties when selecting
|
|
* an HttpAuthScheme.
|
|
* @internal
|
|
*/
|
|
export interface HttpAuthOption {
|
|
schemeId: HttpAuthSchemeId;
|
|
identityProperties?: Record<string, unknown>;
|
|
signingProperties?: Record<string, unknown>;
|
|
propertiesExtractor?: <TConfig extends object, TContext extends HandlerExecutionContext>(config: TConfig, context: TContext) => {
|
|
identityProperties?: Record<string, unknown>;
|
|
signingProperties?: Record<string, unknown>;
|
|
};
|
|
}
|
|
/**
|
|
* @internal
|
|
*/
|
|
export interface SelectedHttpAuthScheme {
|
|
httpAuthOption: HttpAuthOption;
|
|
identity: Identity;
|
|
signer: HttpSigner;
|
|
}
|