Add middleware to require authentication on an endpoint

This commit is contained in:
Stephan
2021-11-10 16:04:26 +01:00
parent 1b7a40cf7c
commit c869863aea
2 changed files with 95 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
import { AuthJWTPayload } from "./Controllers/admin_auth.controller";
declare module "express-serve-static-core" {
interface Request {
auth?: AuthJWTPayload & { isAuthenticated: boolean };
}
}