archetecture security fix

This commit is contained in:
root
2026-06-11 03:22:12 -04:00
parent 6def9993da
commit 9483750161
3126 changed files with 177194 additions and 37211 deletions
+13
View File
@@ -0,0 +1,13 @@
import { Request, Response } from 'express';
/**
* Sends a uniform auth-error JSON response.
* All auth middleware must go through this function so the shape is identical
* to what the errorMiddleware produces for AppError instances.
*/
export declare function sendUnauthorized(res: Response, error: string, message: string): Response<any, Record<string, any>>;
export declare function getCookie(req: Request, name: string): string | null;
export declare function getBearerToken(req: Request): string | null;
export declare function getAuthToken(req: Request, cookieName?: string): string | null;
export declare function sendForbidden(res: Response, error: string, message: string, extra?: Record<string, unknown>): Response<any, Record<string, any>>;
export declare function sendPaymentRequired(res: Response, error: string, message: string, extra?: Record<string, unknown>): Response<any, Record<string, any>>;
//# sourceMappingURL=authHelpers.d.ts.map