import { BaseMiddleware } from "../base.middleware"; import * as express from "express"; import App from "../app"; /** * Default middleware to enable user authentication. * This middleware supports both session and token authorization. * The should be injected as the HTTP header "Authorization" and prefixed with "Bearer". * This middleware retrieve the user from the DB, and adds an user property to the * standard Express request. */ export default class UserAuthMiddleware extends BaseMiddleware { constructor(app: App); apply(req: express.Request, _: express.Response): Promise; }