fix token ttl

4.0
vapao 2023-02-01 17:22:51 +08:00
parent 230d14644a
commit 85fa6d6e9f
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class AuthenticationMiddleware(MiddlewareMixin):
if user and user.token_expired >= time.time() and user.is_active:
if x_real_ip == user.last_ip or AppSetting.get_default('bind_ip') is False:
request.user = user
user.token_expired = time.time() + 8 * 60 * 60
user.token_expired = time.time() + settings.TOKEN_TTL
user.save()
return None
response = json_response(error="验证失败,请重新登录")