mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
This commit is contained in:
@@ -10,7 +10,9 @@ import jwt
|
||||
|
||||
def get_authorization():
|
||||
exp = time.time() + 100000
|
||||
token= jwt.encode({"token_user_name": "admin","exp": exp}, "secret", algorithm="HS512")
|
||||
# secret 请和 com.tencent.supersonic.auth.api.authentication.config.AuthenticationConfig.tokenAppSecret 保持一致
|
||||
secret = "WIaO9YRRVt+7QtpPvyWsARFngnEcbaKBk783uGFwMrbJBaochsqCH62L4Kijcb0sZCYoSsiKGV/zPml5MnZ3uQ=="
|
||||
token= jwt.encode({"token_user_name": "admin","exp": exp}, secret, algorithm="HS512")
|
||||
return "Bearer "+token
|
||||
|
||||
def get_url_pre():
|
||||
|
||||
Reference in New Issue
Block a user