@login_manager.request_loader
def load_user_from_request(request):
    api_key = request.headers.get('Authorization')
    if (not api_key):
        return None
    return User.query.filter_by(api_key=api_key).first()
@login_manager.request_loader
def load_user_from_request(request):
    api_key = request.headers.get('Authorization')
    if (not api_key):
        return None
    return User.query.filter_by(api_key=api_key).first()