perf: client auth changed

This commit is contained in:
ibuler 2025-05-16 18:49:01 +08:00 committed by 老广
parent f9245e17cd
commit 14c5162153
10 changed files with 17 additions and 20 deletions

View File

@ -7574,7 +7574,7 @@ msgid "Auto"
msgstr ""
#: settings/serializers/terminal.py:23
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled.)"
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled)"
msgstr ""
#: settings/serializers/terminal.py:26

View File

@ -8210,10 +8210,10 @@ msgid "Auto"
msgstr "Automático"
#: settings/serializers/terminal.py:23
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled.)"
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled)"
msgstr ""
"Automático (habilitado durante los primeros 5 minutos después del inicio y "
"luego deshabilitado)."
"luego deshabilitado)"
#: settings/serializers/terminal.py:26
msgid "Registration"

View File

@ -7667,8 +7667,8 @@ msgid "Auto"
msgstr "自動"
#: settings/serializers/terminal.py:23
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled.)"
msgstr "自動起動後5分間有効、その後無効にします"
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled)"
msgstr "自動起動後5分間有効、その後無効にします"
#: settings/serializers/terminal.py:26
msgid "Registration"

View File

@ -7723,8 +7723,8 @@ msgid "Auto"
msgstr "자동"
#: settings/serializers/terminal.py:23
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled.)"
msgstr "자동(시작 후 5분간 활성화된 다음 비활성화됨.)"
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled)"
msgstr "자동(시작 후 5분간 활성화된 다음 비활성화됨)"
#: settings/serializers/terminal.py:26
msgid "Registration"

View File

@ -8021,10 +8021,10 @@ msgid "Auto"
msgstr "Automático"
#: settings/serializers/terminal.py:23
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled.)"
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled)"
msgstr ""
"Automático (habilitado nos primeiros 5 minutos após a inicialização, e então"
" desativado.)"
" desativado)"
#: settings/serializers/terminal.py:26
msgid "Registration"

View File

@ -7989,10 +7989,10 @@ msgid "Auto"
msgstr "Авто"
#: settings/serializers/terminal.py:23
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled.)"
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled)"
msgstr ""
"Автоматически (включено в течение первых 5 минут после запуска, затем "
"отключено)."
"отключено)"
#: settings/serializers/terminal.py:26
msgid "Registration"

View File

@ -7727,8 +7727,8 @@ msgid "Auto"
msgstr "自动"
#: settings/serializers/terminal.py:23
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled.)"
msgstr "自动(启动后前 5 分钟启用,然后禁用。)"
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled)"
msgstr "自动(启动后前 5 分钟启用,然后禁用)"
#: settings/serializers/terminal.py:26
msgid "Registration"

View File

@ -7617,8 +7617,8 @@ msgid "Auto"
msgstr "自動"
#: settings/serializers/terminal.py:23
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled.)"
msgstr "自動(啟動後前 5 分鐘啟用,然後禁用"
msgid "Auto(Enabled for the first 5 minutes after startup, then disabled)"
msgstr "自動(啟動後前 5 分鐘啟用,然後禁用)"
#: settings/serializers/terminal.py:26
msgid "Registration"

View File

@ -20,7 +20,7 @@ class TerminalSettingSerializer(serializers.Serializer):
)
SECURITY_SERVICE_ACCOUNT_REGISTRATION = serializers.ChoiceField(
choices=[
('auto', _('Auto(Enabled for the first 5 minutes after startup, then disabled.)')),
('auto', _('Auto(Enabled for the first 5 minutes after startup, then disabled)')),
(True, _('Enable')), (False, _('Disable'))
],
required=True, label=_('Registration'),

View File

@ -48,11 +48,8 @@ def get_user_or_pre_auth_user(request):
def get_redirect_client_url(request):
bearer_token, date_expired = request.user.create_bearer_token(request, age=3600*36*5)
data = {
'type': 'auth',
'bearer_token': bearer_token,
'date_expired': date_expired.timestamp()
'type': 'session'
}
buf = base64.b64encode(json.dumps(data).encode()).decode()
redirect_url = 'jms://{}'.format(buf)