UNPKG

@bitblit/epsilon

Version:

Tiny adapter to simplify building API gateway Lambda APIS

16 lines (15 loc) 748 B
import { APIGatewayEvent } from 'aws-lambda'; import { CommonJwtToken } from '@bitblit/ratchet/dist/common/common-jwt-token'; import { WebTokenManipulator } from './web-token-manipulator'; export declare class GoogleWebTokenManipulator implements WebTokenManipulator { private clientId; private static readonly GOOGLE_DISCOVERY_DOCUMENT; private cacheGoogleDiscoveryDocument; private jwksClient; constructor(clientId: string); extractTokenFromStandardEvent<T>(event: APIGatewayEvent): Promise<CommonJwtToken<T>>; parseAndValidateGoogleToken<T>(googleToken: string, allowExpired?: boolean): Promise<CommonJwtToken<T>>; private fetchSigningKey; private fetchJwksClient; private fetchGoogleDiscoveryDocument; }