old_contents: # -*- coding: utf-8 -*-
  #
  # Copyright (c) 2016 NORDUnet A/S
  # All rights reserved.
  #
  #   Redistribution and use in source and binary forms, with or
  #   without modification, are permitted provided that the following
  #   conditions are met:
  #
  #     1. Redistributions of source code must retain the above copyright
  #        notice, this list of conditions and the following disclaimer.
  #     2. Redistributions in binary form must reproduce the above
  #        copyright notice, this list of conditions and the following
  #        disclaimer in the documentation and/or other materials provided
  #        with the distribution.
  #     3. Neither the name of the NORDUnet nor the names of its
  #        contributors may be used to endorse or promote products derived
  #        from this software without specific prior written permission.
  #
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  # POSSIBILITY OF SUCH DAMAGE.
  #
  
  from __future__ import absolute_import
  
  from eduid_common.api.app import eduid_init_app_no_db
  
  
  def jsconfig_init_app(name, config):
      """
      Create an instance of an eduid jsconfig data app.
  
      First, it will load the configuration from jsconfig.settings.common
      then any settings given in the `config` param.
  
      Then, the app instance will be updated with common stuff by `eduid_init_app`,
      all needed blueprints will be registered with it.
  
      :param name: The name of the instance, it will affect the configuration loaded.
      :type name: str
      :param config: any additional configuration settings. Specially useful
                     in test cases
      :type config: dict
  
      :return: the flask app
      :rtype: flask.Flask
      """
  
      app = eduid_init_app_no_db(name, config)
      app.config.update(config)
  
      from eduid_webapp.jsconfig.views import jsconfig_views
      app.register_blueprint(jsconfig_views)
  
      app.logger.info('Init {} app...'.format(name))
  
      return app
  
new_contents: # -*- coding: utf-8 -*-
  #
  # Copyright (c) 2016 NORDUnet A/S
  # All rights reserved.
  #
  #   Redistribution and use in source and binary forms, with or
  #   without modification, are permitted provided that the following
  #   conditions are met:
  #
  #     1. Redistributions of source code must retain the above copyright
  #        notice, this list of conditions and the following disclaimer.
  #     2. Redistributions in binary form must reproduce the above
  #        copyright notice, this list of conditions and the following
  #        disclaimer in the documentation and/or other materials provided
  #        with the distribution.
  #     3. Neither the name of the NORDUnet nor the names of its
  #        contributors may be used to endorse or promote products derived
  #        from this software without specific prior written permission.
  #
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  # POSSIBILITY OF SUCH DAMAGE.
  #
  
  from eduid_common.api.app import eduid_init_app_no_db
  from eduid_common.authn.utils import no_authn_views
  
  
  def jsconfig_init_app(name: str, config: dict):
      """
      Create an instance of an eduid jsconfig data app.
  
      First, it will load the configuration from jsconfig.settings.common
      then any settings given in the `config` param.
  
      Then, the app instance will be updated with common stuff by `eduid_init_app`,
      all needed blueprints will be registered with it.
      """
  
      app = eduid_init_app_no_db(name, config)
      app.config.update(config)
  
      from eduid_webapp.jsconfig.views import jsconfig_views
      app.register_blueprint(jsconfig_views)
  
      # Register view path that should not be authorized
      no_auth_paths = [
          '/get-bundle',
          '/signup/config'
      ]
      app = no_authn_views(app, no_auth_paths)
  
      app.logger.info('Init {} app...'.format(name))
      return app
  
subject: Set no_auth to get-bundle and signup config endpoint