Commit 05e0664f authored by shenshuo's avatar shenshuo

url传递token支持

parent bb88aedc
......@@ -38,6 +38,11 @@ class BaseHandler(RequestHandler):
### 登陆验证
auth_key = self.get_cookie('auth_key', None)
if not auth_key:
url_auth_key = self.get_argument('auth_key', default=None, strip=True)
if url_auth_key:
auth_key = bytes(url_auth_key, encoding='utf-8')
if not auth_key:
# if not auth_key or not self.get_secure_cookie("user_id") or not self.get_secure_cookie("username") :
# 没登录,就让跳到登陆页面
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment