From 60f7c8fff525325fab838804d2668d491ae40550 Mon Sep 17 00:00:00 2001 From: Stephan <57194608+stephan418@users.noreply.github.com> Date: Wed, 10 Nov 2021 16:12:55 +0100 Subject: [PATCH] Export requireAuthentication --- src/Middleware/auth/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Middleware/auth/auth.ts b/src/Middleware/auth/auth.ts index ae8e63b..cac4a95 100644 --- a/src/Middleware/auth/auth.ts +++ b/src/Middleware/auth/auth.ts @@ -10,7 +10,7 @@ const verifyAuthorizationFormat = (authorization: string) => /^Bearer .+$/.test( const getBearerToken = (authorization: string) => authorization.slice(7); -const requireAuthentication = async (req: Request, res: Response, next: NextFunction) => { +export const requireAuthentication = async (req: Request, res: Response, next: NextFunction) => { const { authorization } = req.headers; if (!authorization) {