'Initializes the Flask-Security extension for the specified
application and datastore implentation.
:param app: The application.
:param datastore: An instance of a user datastore.
:param register_blueprint: to register the Security blueprint or not.'

def init_app(self, app, datastore=None, register_blueprint=True, login_form=None, confirm_register_form=None, register_form=None, forgot_password_form=None, reset_password_form=None, change_password_form=None, send_confirmation_form=None, passwordless_login_form=None, anonymous_user=None):

    self.app = app
    self.datastore = datastore
    for (key, value) in _default_config.items():
        app.config.setdefault(('SECURITY_' + key), value)
    for (key, value) in _default_messages.items():
        app.config.setdefault(('SECURITY_MSG_' + key), value)
    identity_loaded.connect_via(app)(_on_identity_loaded)
    state = _get_state(app, self.datastore, login_form=login_form, confirm_register_form=confirm_register_form, register_form=register_form, forgot_password_form=forgot_password_form, reset_password_form=reset_password_form, change_password_form=change_password_form, send_confirmation_form=send_confirmation_form, passwordless_login_form=passwordless_login_form, anonymous_user=anonymous_user)
    if register_blueprint:
        app.register_blueprint(create_blueprint(state, __name__))
        app.context_processor(_context_processor)
    @app.before_first_request
    def _register_i18n():
        if ('_' not in app.jinja_env.globals):
            app.jinja_env.globals['_'] = state.i18n_domain.gettext
    state.render_template = self.render_template
    app.extensions['security'] = state
    if hasattr(app, 'cli'):
        from .cli import users, roles
        if state.cli_users_name:
            app.cli.add_command(users, state.cli_users_name)
        if state.cli_roles_name:
            app.cli.add_command(roles, state.cli_roles_name)
    return state
