Unverified Commit 00763e98 authored by 老广's avatar 老广 Committed by GitHub

Merge pull request #2408 from jumpserver/dev

[Update] 修改token有效期
parents d09b34e2 f9a7cca4
......@@ -311,8 +311,8 @@ class User(AbstractUser):
token = cache.get('%s_%s' % (self.id, remote_addr))
if not token:
token = uuid.uuid4().hex
cache.set(token, self.id, expiration)
cache.set('%s_%s' % (self.id, remote_addr), token, expiration)
cache.set(token, self.id, expiration)
cache.set('%s_%s' % (self.id, remote_addr), token, expiration)
return token
def refresh_bearer_token(self, token):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment