UNPKG

@senacor/azure-function-middleware

Version:

Middleware for azure functions to handle authentication, authorization, error handling and logging

11 lines (10 loc) 485 B
import { HttpHandler } from '@azure/functions'; import { BeforeExecutionFunction } from '../middleware'; export type ValidationFunction = (headers: Headers) => boolean | Promise<boolean>; export type HeaderAuthenticationOptions = { validateUsingHeaderFn: ValidationFunction; errorResponseBody: unknown; skipIfResultIsFaulty: boolean; }; declare const _default: (opts?: Partial<HeaderAuthenticationOptions>) => BeforeExecutionFunction<HttpHandler>; export default _default;