fix: add await
This commit is contained in:
@@ -18,7 +18,7 @@ class UserLogoutCommand:
|
|||||||
if not refresh_token:
|
if not refresh_token:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
payload: RefreshTokenPayload = self._jwt_service.decode_refresh_token(refresh_token)
|
payload: RefreshTokenPayload = await self._jwt_service.decode_refresh_token(refresh_token)
|
||||||
except ApplicationException:
|
except ApplicationException:
|
||||||
self._logger.debug('Logout: refresh token invalid/expired, skipping revoke')
|
self._logger.debug('Logout: refresh token invalid/expired, skipping revoke')
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ async def require_access_token(
|
|||||||
if not token:
|
if not token:
|
||||||
raise ApplicationException(status_code=401, message="Not authenticated")
|
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":
|
if payload.type != "access":
|
||||||
raise ApplicationException(status_code=401, message="Invalid token type")
|
raise ApplicationException(status_code=401, message="Invalid token type")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user