summaryrefslogtreecommitdiff
path: root/kvmd/apps
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-01-22 18:11:26 +0200
committerMaxim Devaev <[email protected]>2023-01-22 19:35:45 +0200
commit828778f10afb5d9e3824c72ba559e448e158b4ce (patch)
tree27e5aaa0f26b9486a5aee475aef5ca78bcc8256b /kvmd/apps
parent2cbdd9984a51854930885967b8eddb78b58783b6 (diff)
refactoring
Diffstat (limited to 'kvmd/apps')
-rw-r--r--kvmd/apps/kvmd/__init__.py6
-rw-r--r--kvmd/apps/kvmd/auth.py5
2 files changed, 6 insertions, 5 deletions
diff --git a/kvmd/apps/kvmd/__init__.py b/kvmd/apps/kvmd/__init__.py
index dcc9efea..4d891f40 100644
--- a/kvmd/apps/kvmd/__init__.py
+++ b/kvmd/apps/kvmd/__init__.py
@@ -74,12 +74,14 @@ def main(argv: (list[str] | None)=None) -> None:
KvmdServer(
auth_manager=AuthManager(
+ enabled=config.auth.enabled,
+
internal_type=config.auth.internal.type,
internal_kwargs=config.auth.internal._unpack(ignore=["type", "force_users"]),
+ force_internal_users=config.auth.internal.force_users,
+
external_type=config.auth.external.type,
external_kwargs=(config.auth.external._unpack(ignore=["type"]) if config.auth.external.type else {}),
- force_internal_users=config.auth.internal.force_users,
- enabled=config.auth.enabled,
),
info_manager=InfoManager(global_config),
log_reader=(LogReader() if config.log_reader.enabled else None),
diff --git a/kvmd/apps/kvmd/auth.py b/kvmd/apps/kvmd/auth.py
index cfc2fb6a..6ae696ad 100644
--- a/kvmd/apps/kvmd/auth.py
+++ b/kvmd/apps/kvmd/auth.py
@@ -34,15 +34,14 @@ from ...plugins.auth import get_auth_service_class
class AuthManager:
def __init__(
self,
+ enabled: bool,
internal_type: str,
internal_kwargs: dict,
+ force_internal_users: list[str],
external_type: str,
external_kwargs: dict,
-
- force_internal_users: list[str],
- enabled: bool,
) -> None:
self.__enabled = enabled