Skip to content

Commit 27c0fcb

Browse files
committed
Allow specifying auth_service_url in tenant config
1 parent fa0feee commit 27c0fcb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/server.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
RegistrationRequestsController
2626
from utils import i18n
2727

28-
AUTH_PATH = os.environ.get('AUTH_PATH', '/auth')
2928
SKIP_LOGIN = os.environ.get('SKIP_LOGIN', False)
3029

3130
# Flask application
@@ -113,8 +112,11 @@ def handler():
113112

114113

115114
def auth_path_prefix():
116-
# e.g. /admin/org1/auth
117-
return app.session_interface.tenant_path_prefix().rstrip("/") + "/" + AUTH_PATH.lstrip("/")
115+
tenant = tenant_handler.tenant()
116+
config_handler = RuntimeConfig("adminGui", app.logger)
117+
config = config_handler.tenant_config(tenant)
118+
auth_path = config.get('auth_service_url', '/auth/')
119+
return app.session_interface.tenant_path_prefix().rstrip("/") + "/" + auth_path.lstrip("/")
118120

119121

120122
# create controllers (including their routes)

0 commit comments

Comments
 (0)