def METHOD_NAME(*args, **kwds):
    if not flask_login.current_user.is_authenticated:
        error_details = {
            "error": "authentication_required",
            "error_description": "Authentication is required to access this API.",
        }
        return (error_details, 401, {"WWW-Authenticate": "Token"})
    else:
        return f(*args, **kwds)