MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / parse_jwt_payload

Method parse_jwt_payload

daily/chinaUnicom.py:1264–1275  ·  view source on GitHub ↗
(self, token)

Source from the content-addressed store, hash-verified

1262 self.log(f"wocare_luckDraw 异常: {str(e)}")
1263
1264 def parse_jwt_payload(self, token):
1265 try:
1266 payload = token.split('.')[1]
1267 padding = len(payload) % 4
1268 if padding:
1269 payload += '=' * (4 - padding)
1270 payload = payload.replace('-', '+').replace('_', '/')
1271 decoded_bytes = base64.b64decode(payload)
1272 return json.loads(decoded_bytes.decode('utf-8'))
1273 except Exception as e:
1274 self.log(f"JWT Decode Error: {e}")
1275 return {}
1276
1277 def generate_market_signature_headers(self, user_token, query_string="", json_body=""):
1278 try:

Callers 2

market_watering_taskMethod · 0.95

Calls 1

logMethod · 0.95

Tested by

no test coverage detected