From 33782d15d5733a8ec9f4062061b828d99cd92da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Mon, 26 Apr 2021 21:31:08 +0200 Subject: [PATCH] fix: add hosted auth option --- src/lib/app.ts | 5 +++++ src/lib/types/option.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/src/lib/app.ts b/src/lib/app.ts index 4d85378ca4..eb6353e257 100644 --- a/src/lib/app.ts +++ b/src/lib/app.ts @@ -73,6 +73,11 @@ export default function getApp( config.authentication.customAuthHandler(app, config, services); break; } + case IAuthType.HOSTED: { + app.use(baseUriPath, apiTokenMiddleware(config, services)); + config.authentication.customAuthHandler(app, config, services); + break; + } case IAuthType.DEMO: { demoAuthentication(app, config.server.baseUriPath, services); break; diff --git a/src/lib/types/option.ts b/src/lib/types/option.ts index 8cbd21ee19..bdfe72d43c 100644 --- a/src/lib/types/option.ts +++ b/src/lib/types/option.ts @@ -38,6 +38,7 @@ export enum IAuthType { OPEN_SOURCE = 'open-source', DEMO = 'demo', ENTERPRISE = 'enterprise', + HOSTED = 'hosted', CUSTOM = 'custom', NONE = 'none', }