12 lines
496 B
TypeScript
12 lines
496 B
TypeScript
import { Request, Response, NextFunction } from 'express';
|
|
export interface AuthRequest extends Request {
|
|
user?: {
|
|
id: string;
|
|
email: string;
|
|
name: string;
|
|
isAdmin?: boolean;
|
|
isApiEnabled?: boolean;
|
|
};
|
|
}
|
|
export declare const authenticate: (req: AuthRequest, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>>>;
|
|
export declare const optionalAuth: (req: AuthRequest, res: Response, next: NextFunction) => Promise<void>;
|