16 lines
860 B
TypeScript
16 lines
860 B
TypeScript
import { Request, Response, NextFunction } from 'express';
|
|
import { AdminRole } from '@rentaldrivego/database';
|
|
/**
|
|
* Requires a valid admin session token.
|
|
*
|
|
* Guarantees on success:
|
|
* req.admin — the full AdminUser record
|
|
*/
|
|
export declare function requireAdminAuth(req: Request, res: Response, next: NextFunction): Promise<Response<any, Record<string, any>> | undefined>;
|
|
/**
|
|
* Requires the authenticated admin to have at least `minimumRole`.
|
|
* Must be applied after `requireAdminAuth`.
|
|
*/
|
|
export declare function requireAdminRole(minimumRole: AdminRole): (req: Request, res: Response, next: NextFunction) => Response<any, Record<string, any>> | undefined;
|
|
export declare function requireFreshAdmin2FA(req: Request, res: Response, next: NextFunction): Response<any, Record<string, any>> | undefined;
|
|
//# sourceMappingURL=requireAdminAuth.d.ts.map
|