Beispiel #1
0
def new_restful_api(blueprint):
    """
    Flask-Restful asks for authentication on 401 error through http basic-auth. Since
    we're not using http basic-auth, we have to disable this default handler.
    :param blueprint:
    :return:
    """
    api = Api(blueprint)
    api.unauthorized = _unauthorized_override
    return api
Beispiel #2
0
def new_restful_api(blueprint):
    """
    Flask-Restful asks for authentication on 401 error through http basic-auth. Since
    we're not using http basic-auth, we have to disable this default handler.
    :param blueprint:
    :return:
    """
    api = Api(blueprint)
    api.unauthorized = _unauthorized_override
    return api