10 lines
543 B
TypeScript
10 lines
543 B
TypeScript
/**
|
|
* Optional JWT authentication — attaches user when a valid Bearer token is present,
|
|
* otherwise continues without req.user (for guest support routes).
|
|
*/
|
|
import { Response, NextFunction } from 'express';
|
|
import { AuthRequest } from './auth';
|
|
export declare function optionalAuthMiddleware(req: AuthRequest, res: Response, next: NextFunction): Promise<void>;
|
|
/** Reads anonymous visitor token from header or query. */
|
|
export declare function readVisitorToken(req: AuthRequest): string | null;
|
|
//# sourceMappingURL=optionalAuth.d.ts.map
|