@bitblit/epsilon
Version:
Tiny adapter to simplify building API gateway Lambda APIS
19 lines (18 loc) • 787 B
TypeScript
import { Callback, Context, CustomAuthorizerEvent } from 'aws-lambda';
/**
* This class is to simplify if the user wants to use a AWS Gateway authorizer in conjunction with Epsilon
*/
export declare class ApiGatewayAdapterAuthenticationHandler {
private webTokenManipulator;
constructor(issuer: string, encryptionKeys: string);
/**
* This is the default authorizer - parses the incoming JWT token and sticks it
* into context (or blocks if none/invalid found)
* @param event
* @param {Context} context
* @param {Callback} callback
*/
lambdaHandler(event: CustomAuthorizerEvent, context: Context, callback: Callback): void;
private createPolicy;
static extractTokenStringFromAuthorizerEvent(event: CustomAuthorizerEvent): string;
}