def require_auth_header(func):
""" no auth check is performed but the auth headers are still required. auth check
is performed by a service other than ourselves """
@wraps(func)
def decorator(*args, **kwargs):
if not request.authorization:
return ErrorResponseJson("auth header required").make_response()
return func(*args, **kwargs)
return decorator
评论列表
文章目录