@bitblit/epsilon
Version:
Tiny adapter to simplify building API gateway Lambda APIS
17 lines (16 loc) • 865 B
TypeScript
import { CommonJwtToken } from '@bitblit/ratchet/dist/common/common-jwt-token';
import { APIGatewayEvent } from 'aws-lambda';
import { WebTokenManipulator } from './web-token-manipulator';
/**
* Service for handling jwt tokens
*/
export declare class LocalWebTokenManipulator implements WebTokenManipulator {
private encryptionKey;
private issuer;
constructor(encryptionKey: string, issuer: string);
refreshJWTString<T>(tokenString: string, expirationSeconds: number): string;
parseAndValidateJWTString<T>(tokenString: string, now?: number): CommonJwtToken<T>;
parseJWTString<T>(tokenString: string): CommonJwtToken<T>;
createJWTString<T>(principal: string, userObject: T, roles?: string[], expirationSeconds?: number, proxyUser?: T): string;
extractTokenFromStandardEvent<T>(event: APIGatewayEvent): Promise<CommonJwtToken<T>>;
}