mirror of https://github.com/jumpserver/jumpserver
[Update] 修改token有效期
parent
2737675c36
commit
f9a7cca478
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue