From 5a77c36a9593e566f05d3299b5220af7b082f2a4 Mon Sep 17 00:00:00 2001 From: maozhen Date: Mon, 29 Dec 2025 14:17:30 +0800 Subject: [PATCH] ``` refactor(auth): remove redundant comments from JWT strategy configurationRemove duplicate comments that were explaining the JWT lifetime configuration in both API and client authentication backends. The code remains functionallyunchanged but comments are cleaned up for better maintainability. ``` --- cognee/modules/users/authentication/get_api_auth_backend.py | 1 - cognee/modules/users/authentication/get_client_auth_backend.py | 1 - 2 files changed, 2 deletions(-) diff --git a/cognee/modules/users/authentication/get_api_auth_backend.py b/cognee/modules/users/authentication/get_api_auth_backend.py index 8a408250c..4c11d3903 100644 --- a/cognee/modules/users/authentication/get_api_auth_backend.py +++ b/cognee/modules/users/authentication/get_api_auth_backend.py @@ -16,7 +16,6 @@ def get_api_auth_backend(): def get_jwt_strategy() -> JWTStrategy[models.UP, models.ID]: secret = os.getenv("FASTAPI_USERS_JWT_SECRET", "super_secret") - # 使用环境变量配置过期时间,默认与 client_auth_backend 保持一致(3600秒) lifetime_seconds = int(os.getenv("JWT_LIFETIME_SECONDS", "3600")) return APIJWTStrategy(secret, lifetime_seconds=lifetime_seconds) diff --git a/cognee/modules/users/authentication/get_client_auth_backend.py b/cognee/modules/users/authentication/get_client_auth_backend.py index 3ffe668a8..ba5dad2b3 100644 --- a/cognee/modules/users/authentication/get_client_auth_backend.py +++ b/cognee/modules/users/authentication/get_client_auth_backend.py @@ -18,7 +18,6 @@ def get_client_auth_backend(): from .default.default_jwt_strategy import DefaultJWTStrategy secret = os.getenv("FASTAPI_USERS_JWT_SECRET", "super_secret") - # 使用环境变量配置过期时间,默认 3600 秒(1小时) lifetime_seconds = int(os.getenv("JWT_LIFETIME_SECONDS", "3600")) return DefaultJWTStrategy(secret, lifetime_seconds=lifetime_seconds)