mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-17 07:49:01 +00:00
perf: 统一 connect token 配置名称
This commit is contained in:
@@ -21,7 +21,7 @@ from terminal.models import Applet
|
||||
|
||||
|
||||
def date_expired_default():
|
||||
return timezone.now() + timedelta(seconds=settings.CONNECTION_TOKEN_EXPIRATION)
|
||||
return timezone.now() + timedelta(seconds=settings.CONNECTION_TOKEN_ONETIME_EXPIRATION)
|
||||
|
||||
|
||||
class ConnectionToken(JMSOrgBaseModel):
|
||||
|
@@ -70,7 +70,7 @@ class ConnectionTokenUpdateSerializer(ConnectionTokenSerializer):
|
||||
if delta.total_seconds() > 3600 * 24:
|
||||
return self.instance.date_expired
|
||||
|
||||
seconds = settings.CONNECTION_TOKEN_EXPIRATION_MAX
|
||||
seconds = settings.CONNECTION_TOKEN_REUSABLE_EXPIRATION
|
||||
return timezone.now() + timezone.timedelta(seconds=seconds)
|
||||
|
||||
@staticmethod
|
||||
|
Reference in New Issue
Block a user