Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
ops_sdk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PublicSource
ops_sdk
Commits
05e0664f
Commit
05e0664f
authored
Apr 26, 2019
by
shenshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url传递token支持
parent
bb88aedc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
base_handler.py
websdk/base_handler.py
+5
-0
No files found.
websdk/base_handler.py
View file @
05e0664f
...
@@ -38,6 +38,11 @@ class BaseHandler(RequestHandler):
...
@@ -38,6 +38,11 @@ class BaseHandler(RequestHandler):
### 登陆验证
### 登陆验证
auth_key
=
self
.
get_cookie
(
'auth_key'
,
None
)
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
:
# if not auth_key or not self.get_secure_cookie("user_id") or not self.get_secure_cookie("username") :
# if not auth_key or not self.get_secure_cookie("user_id") or not self.get_secure_cookie("username") :
# 没登录,就让跳到登陆页面
# 没登录,就让跳到登陆页面
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment