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

@@ -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)