koas-security
Version:
Koas security checks if a request matches the security requirement of an operation. For example, given the following partial OpenAPI document:
9 lines (8 loc) • 312 B
TypeScript
import { Context } from 'koa';
/**
* Patse the authorization token from the Koa context.
*
* @param ctx - The Koa context containing the token.
* @returns A tuple containing the type and value of the authorization header.
*/
export declare function parseAuthorizationHeader(ctx: Context): [string, string];