mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
fix: Token auth (#3543)
This commit is contained in:
parent
4f31977d7d
commit
9d2fd05604
|
|
@ -303,5 +303,7 @@ class UserToken(AuthBaseHandle):
|
|||
timeout = CONFIG.get_session_timeout()
|
||||
cache.touch(token, timeout=timeout, version=version)
|
||||
user = QuerySet(User).get(id=auth_details['id'])
|
||||
if not user.is_active or user.password != cache_token.password:
|
||||
raise AppAuthenticationFailed(1002, _('Authentication information is incorrect'))
|
||||
auth = get_auth(user)
|
||||
return user, auth
|
||||
|
|
|
|||
Loading…
Reference in New Issue