From 4a485cb009926011e997d7f1cb0b5464840e0a00 Mon Sep 17 00:00:00 2001 From: ikaros <327209194@qq.com> Date: Wed, 28 Feb 2024 21:01:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BE=8B=E7=A8=8B=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_zhipu/app_api.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/tests/test_zhipu/app_api.py b/tests/test_zhipu/app_api.py index b18a9093..412dd3e8 100644 --- a/tests/test_zhipu/app_api.py +++ b/tests/test_zhipu/app_api.py @@ -1,29 +1,3 @@ -# import time -# import jwt - -# def generate_token(apikey: str, exp_seconds: int): -# try: -# id, secret = apikey.split(".") -# except Exception as e: -# raise Exception("invalid apikey", e) - -# payload = { -# "api_key": id, -# "exp": int(round(time.time() * 1000)) + exp_seconds * 1000, -# "timestamp": int(round(time.time() * 1000)), -# } - -# tmp = jwt.JWT() - -# return tmp.encode( -# payload, -# secret, -# alg="HS256", -# optional_headers={"alg": "HS256", "sign_type": "SIGN"}, -# ) - -# print(generate_token("25571a2d0af8583121c3248be7e89d29.AuIX3O5ktKuQVMtC", 30 * 24 * 3600)) - import time import jwt # 确保这是 PyJWT 库 import requests