From 0cca0fedbe6cf0e5cfb9ce354593444e3d18629e Mon Sep 17 00:00:00 2001 From: Noloquideus Date: Tue, 12 May 2026 22:47:50 +0300 Subject: [PATCH] fix: add await --- src/application/commands/user_logout.py | 2 +- src/presentation/decorators/auth.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/application/commands/user_logout.py b/src/application/commands/user_logout.py index 385987a..2a652bd 100644 --- a/src/application/commands/user_logout.py +++ b/src/application/commands/user_logout.py @@ -18,7 +18,7 @@ class UserLogoutCommand: if not refresh_token: return try: - payload: RefreshTokenPayload = self._jwt_service.decode_refresh_token(refresh_token) + payload: RefreshTokenPayload = await self._jwt_service.decode_refresh_token(refresh_token) except ApplicationException: self._logger.debug('Logout: refresh token invalid/expired, skipping revoke') return diff --git a/src/presentation/decorators/auth.py b/src/presentation/decorators/auth.py index 6dedb55..c16d946 100644 --- a/src/presentation/decorators/auth.py +++ b/src/presentation/decorators/auth.py @@ -29,7 +29,7 @@ async def require_access_token( if not token: raise ApplicationException(status_code=401, message="Not authenticated") - payload = jwt_service.decode_access_token(token) + payload = await jwt_service.decode_access_token(token) if payload.type != "access": raise ApplicationException(status_code=401, message="Invalid token type")