diff --git a/common_lib/utils/auth.py b/common_lib/utils/auth.py index e6b9f6c..64ca137 100644 --- a/common_lib/utils/auth.py +++ b/common_lib/utils/auth.py @@ -19,7 +19,8 @@ class CurrentUser: async def get_current_user( request: Request, - credentials: HTTPAuthorizationCredentials = Depends(auth_scheme) + credentials: HTTPAuthorizationCredentials = Depends(auth_scheme), + require_permissions: bool = False ): token = credentials.credentials ip = request.client.host or "(unknown)" @@ -32,7 +33,8 @@ async def get_current_user( json={ "token": token, "ip": ip, - "user_agent": user_agent + "user_agent": user_agent, + "require_permissions": require_permissions }, timeout=5.0 ) diff --git a/pyproject.toml b/pyproject.toml index 0717784..dd7b0cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "common-lib" -version = "0.0.1" +version = "0.0.2" description = "Библиотека общих компонентов для микросервисов yobble" authors = [{ name = "cheykrym", email = "you@example.com" }] license = "MIT"