@adonisjs/shield
Version:
A middleware for AdonisJS to keep web applications secure from common web attacks
33 lines (32 loc) • 1.08 kB
TypeScript
import { HttpContext } from '@adonisjs/core/http';
export declare const E_BAD_CSRF_TOKEN: {
new (message?: string, options?: ErrorOptions & {
code?: string;
status?: number;
}): {
code: string;
status: number;
message: string;
identifier: string;
/**
* Returns the message to be sent in the HTTP response.
* Feel free to override this method and return a custom
* response.
*/
getResponseMessage(error: /*elided*/ any, ctx: HttpContext): string;
handle(error: /*elided*/ any, ctx: HttpContext): Promise<void>;
name: string;
help?: string;
toString(): string;
readonly [Symbol.toStringTag]: string;
stack?: string;
cause?: unknown;
};
help?: string;
code?: string;
status?: number;
message?: string;
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
stackTraceLimit: number;
};