import { ExpressRequest, Response } from '../v1'; /** Key-value metadata to pass to a function. */ export declare type AuthMiddlewareMetadata = any; /** * Middleware to authenticate the request and provide extra metadata once authenticated. * @param req The request object. * @param res The response object. * @param required If true, the middleware is encouraged to send an unauthorized response * if the request is not authenticated. Otherwise, the middleware can do whatever the hell it * wants. */ export declare type AuthMetadataMiddlewareFunction = (req: ExpressRequest, res: Response, required: boolean) => Promise;