Cut deps with CentralRestServerAuthentication
MODIFY
src/server/rest/router/GlobalRouter.ts
src/server/rest/router/GlobalRouter.ts
-import CentralRestServerAuthentication from '../CentralRestServerAuthentication';
+import AuthService from '../service/AuthService';
import { authRouter } from './auth/AuthRouter';
import express from 'express';
import { swaggerRouter } from './doc/SwaggerRouter';
@@ -6,8 +6,11 @@ import { tenantRouter } from './api/TenantRouter';
export const globalRouter = express.Router();
+// Init Secured Service
+AuthService.initialize();
+
// API
-globalRouter.use('/v1/api', CentralRestServerAuthentication.authenticate(), tenantRouter);
+globalRouter.use('/v1/api', AuthService.authenticate(), tenantRouter);
// Auth
globalRouter.use('/v1/auth', authRouter);

Cut deps with CentralRestServerAuthentication