Commit 0a7bd5d0 authored by lcn's avatar lcn

提交

parent b55c7367
......@@ -7,7 +7,7 @@ import json
def jwt_user(request):
"""从jwt中解析user_id"""
token = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxOTA1OTAsImV4cCI6MTY2MDAxNjU0Mn0.hwa2euNSS5VKE90zmxuiq6heAlb-3Oh_a-pH4Jv6Fjg'
token = request.token
if not token:
return None
try:
......
......@@ -16,8 +16,8 @@ from unify_api.modules.users.views.recive_refresh_token import \
def before_app_start(app):
# app.middleware('request')(auth_verify)
# app.middleware('request')(auth_verify_cid)
app.middleware('request')(auth_verify)
app.middleware('request')(auth_verify_cid)
app.blueprint(wechat_blueprint)
app.blueprint(auth_blueprint)
app.blueprint(refresh_blueprint)
......
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