UNPKG

lambda-live-debugger

Version:

Debug Lambda functions locally like it is running in the cloud

19 lines (18 loc) 806 B
import { endpointMiddlewareOptions } from "@smithy/middleware-endpoint"; import { httpAuthSchemeMiddleware } from "./httpAuthSchemeMiddleware"; export const httpAuthSchemeEndpointRuleSetMiddlewareOptions = { step: "serialize", tags: ["HTTP_AUTH_SCHEME"], name: "httpAuthSchemeMiddleware", override: true, relation: "before", toMiddleware: endpointMiddlewareOptions.name, }; export const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ applyToStack: (clientStack) => { clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); }, });