express-jwt-xsrf
Version:
Express filter for jwt parsing with anti-xsrf synchronizer.
20 lines (19 loc) • 604 B
TypeScript
/// <reference types="express" />
import * as express from 'express';
/**
* axsrfWithCors implementation.
*
* Filter defined to accept cors and validate specified bearer token integrity
* according to the specified secret key and participating anti-xsrf cookie.
*
* @author Kirk Bulis
*/
declare function axsrfWithCors(options: {
hashingSecretKey: string;
hashingAlgorithm: string;
allowOrigin?: string;
jsonLimit?: number;
identify: (res: express.Response, member?: any) => void;
debug?: boolean;
}): express.RequestHandler[];
export { axsrfWithCors };