Skip to content

Commit d709d3a

Browse files
committed
fix: Token auth
1 parent 4f31977 commit d709d3a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/common/auth/handle/impl/user_token.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,5 +303,7 @@ def handle(self, request, token: str, get_token_details):
303303
timeout = CONFIG.get_session_timeout()
304304
cache.touch(token, timeout=timeout, version=version)
305305
user = QuerySet(User).get(id=auth_details['id'])
306+
if not user.is_active or user.password != cache_token.password:
307+
raise AppAuthenticationFailed(1002, _('Authentication information is incorrect'))
306308
auth = get_auth(user)
307309
return user, auth

0 commit comments

Comments
 (0)