Skip to content

Commit

Permalink
Update base_handler.py
Browse files Browse the repository at this point in the history
升级jwt2.0
  • Loading branch information
ss1917 authored Mar 23, 2021
1 parent 6db2e4c commit 1558495
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/base_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def prepare(self):
# 没登录,就让跳到登陆页面
raise HTTPError(401, 'auth failed 1')
else:
user_info = jwt.decode(auth_key, verify=False).get('data')
#user_info = jwt.decode(auth_key, verify=False).get('data')
user_info = jwt.decode(auth_key, options={"verify_signature": False}).get('data')
self.user_id = user_info.get('user_id', None)
self.username = user_info.get('username', None)
self.nickname = user_info.get('nickname', None)
Expand Down

0 comments on commit 1558495

Please sign in to comment.