def init_app(app, **kwargs):
    # pylint: disable=unused-argument
    """
    Init auth module.
    """
    # Bind Flask-Login for current_user
    login_manager.request_loader(load_user_from_request)

    # Mount authentication routes
    app.register_blueprint(views.auth_blueprint)
def init_app(app, **kwargs):
    # pylint: disable=unused-argument
    """
    Init auth module.
    """
    # Bind Flask-Login for current_user
    login_manager.request_loader(load_user_from_request)

    # Register OAuth scopes
    api_v1.add_oauth_scope('auth:read', "Provide access to auth details")
    api_v1.add_oauth_scope('auth:write', "Provide write access to auth details")

    # Touch underlying modules
    from . import models, views, resources  # pylint: disable=unused-variable

    # Mount authentication routes
    app.register_blueprint(views.auth_blueprint)
    api_v1.add_namespace(resources.api)
Beispiel #3
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument
    """
    Init auth module.
    """
    # Bind Flask-Login for current_user
    login_manager.request_loader(load_user_from_request)

    # Register OAuth scopes
    api_v1.add_oauth_scope('auth:read', "Provide access to auth details")
    api_v1.add_oauth_scope('auth:write',
                           "Provide write access to auth details")

    # Touch underlying modules
    from . import models, views, resources  # pylint: disable=unused-variable

    # Mount authentication routes
    app.register_blueprint(views.auth_blueprint)
    api_v1.add_namespace(resources.api)
def init_app(app, **kwargs):
    # Bind Flask-Login for current_user
    login_manager.request_loader(load_user_from_request)

    # Mount authentication routes
    app.register_blueprint(views.auth_blueprint)