def __init__(self):

        config_values = config.StaticValues().config_file
        self.url = config_values['elastic_url']
        self.headers = {
            "Content-Type": "application/json",
            "Authorization":
            "Basic " + config_values['reportatron_service_user']
        }
        self.sess = requests.Session()
from flask import Flask, render_template, request, redirect, url_for
from elasticstuff import search
from webhandlers import assetsflask, engagementsflask, testsflask, issuesflask, thirdpartyflask, servicesflask, statsflask, reportsflask, loginflask
from waitress import serve
import config
import flask_login
from datetime import timedelta

application = Flask(__name__)
config_values = config.StaticValues().config_file
application.config.from_object(config_values['config_type'])
application.permanent_session_lifetime = timedelta(minutes=15)

searchConnection = search.Search()

login_manager = flask_login.LoginManager()
login_manager.init_app(application)
login_manager.login_view = 'login'


@login_manager.user_loader
def user_loader(username):
    return loginflask.user_loader(username)


@application.route('/login', methods=['GET'])
def login():
    return loginflask.login()


@application.route('/loginapi', methods=['POST'])