df8b6833 by 周伟奇

token modify part3

1 parent f2a7c4b4
...@@ -42,7 +42,7 @@ class MyJSONWebTokenAuthentication(JSONWebTokenAuthentication): ...@@ -42,7 +42,7 @@ class MyJSONWebTokenAuthentication(JSONWebTokenAuthentication):
42 if jwt_value is None: 42 if jwt_value is None:
43 return None 43 return None
44 44
45 jwt_str = str(jwt_value)[-10:] 45 jwt_str = str(jwt_value, 'UTF-8')[-10:]
46 is_expired = rh.get_token(jwt_str) 46 is_expired = rh.get_token(jwt_str)
47 if isinstance(is_expired, str): 47 if isinstance(is_expired, str):
48 rh.set_token(jwt_str) 48 rh.set_token(jwt_str)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!