Commit eb25c449 authored by wang.wenrong's avatar wang.wenrong

debug_login_auth

parent d3b3699e
Subproject commit 05cfad9387871294a0215dabeccad37adbc487e3
Subproject commit a878a1f82788f11deea04f8e64f668a83ed3a449
......@@ -42,7 +42,12 @@ async def get_test(request):
def is_need_verify(path):
# return False
if SETTING.debug_mode == 1:
return False
if "swagger" in path:
return False
log.info("is_or_not_need_verify path:%s", path)
if "swagger" in path:
return False
......@@ -98,6 +103,8 @@ def is_need_verify(path):
async def auth_verify(request):
if SETTING.debug_mode == 1:
return False
path = request.path
if is_need_verify(path):
token = request.token
......@@ -136,6 +143,10 @@ async def auth_verify(request):
def is_need_auth_verify_cid(path):
if SETTING.debug_mode == 1:
return False
if "swagger" in path:
return False
if re.match("^/unify-api/auth/", path):
return False
if re.match("^/api/common/wechat/mp", path):
......@@ -148,6 +159,8 @@ def is_need_auth_verify_cid(path):
async def auth_verify_cid(request):
"""增加工厂权限校验"""
if SETTING.debug_mode == 1:
return False
path = request.path
# if not re.match("^/unify-api/auth/?$", path):
if is_need_auth_verify_cid(path):
......
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