From dc5f57b37f9f65595c4cae81fb72427404eb24d7 Mon Sep 17 00:00:00 2001 From: Nick Proskurin <42863572+MCPN@users.noreply.github.com> Date: Thu, 9 Nov 2023 16:43:00 +0100 Subject: [PATCH] Move TrustAuthService from dl_core to dl_api_commons (#82) --- app/dl_control_api/dl_control_api/app_factory.py | 2 +- .../dl_api_commons/flask/middlewares}/trust_auth.py | 0 lib/dl_api_lib_testing/dl_api_lib_testing/app.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename lib/{dl_core/dl_core/flask_utils => dl_api_commons/dl_api_commons/flask/middlewares}/trust_auth.py (100%) diff --git a/app/dl_control_api/dl_control_api/app_factory.py b/app/dl_control_api/dl_control_api/app_factory.py index 0ed7f1cea..aa969ff56 100644 --- a/app/dl_control_api/dl_control_api/app_factory.py +++ b/app/dl_control_api/dl_control_api/app_factory.py @@ -62,7 +62,7 @@ def set_up_environment( testing_app_settings: Optional[ControlApiAppTestingsSettings] = None, ) -> EnvSetupResult: us_auth_mode: USAuthMode - from dl_core.flask_utils.trust_auth import TrustAuthService + from dl_api_commons.flask.middlewares.trust_auth import TrustAuthService TrustAuthService( fake_user_id="_user_id_", diff --git a/lib/dl_core/dl_core/flask_utils/trust_auth.py b/lib/dl_api_commons/dl_api_commons/flask/middlewares/trust_auth.py similarity index 100% rename from lib/dl_core/dl_core/flask_utils/trust_auth.py rename to lib/dl_api_commons/dl_api_commons/flask/middlewares/trust_auth.py diff --git a/lib/dl_api_lib_testing/dl_api_lib_testing/app.py b/lib/dl_api_lib_testing/dl_api_lib_testing/app.py index d611e2476..69da45d86 100644 --- a/lib/dl_api_lib_testing/dl_api_lib_testing/app.py +++ b/lib/dl_api_lib_testing/dl_api_lib_testing/app.py @@ -8,6 +8,7 @@ import flask from dl_api_commons.aio.middlewares.auth_trust_middleware import auth_trust_middleware +from dl_api_commons.flask.middlewares.trust_auth import TrustAuthService from dl_api_lib.app.control_api.app import ControlApiAppFactory from dl_api_lib.app.control_api.app import EnvSetupResult as ControlApiEnvSetupResult from dl_api_lib.app.data_api.app import DataApiAppFactory @@ -42,7 +43,6 @@ from dl_core.aio.middlewares.services_registry import services_registry_middleware from dl_core.aio.middlewares.us_manager import service_us_manager_middleware from dl_core.data_processing.cache.primitives import CacheTTLConfig -from dl_core.flask_utils.trust_auth import TrustAuthService from dl_core.services_registry.entity_checker import EntityUsageChecker from dl_core.services_registry.env_manager_factory_base import EnvManagerFactory from dl_core.services_registry.inst_specific_sr import InstallationSpecificServiceRegistryFactory