mirror of
https://github.com/iFargle/headscale-webui.git
synced 2026-03-21 05:54:44 +01:00
test
This commit is contained in:
@@ -8,12 +8,10 @@ from concurrent.futures import wait, ALL_COMPLETED
|
||||
from flask_executor import Executor
|
||||
from flask.logging import create_logger
|
||||
|
||||
AUTH_TYPE = os.environ["AUTH_TYPE"].replace('"', '')
|
||||
STATIC_URL_PATH = "/static"
|
||||
app = FlaskOIDC(__name__)
|
||||
app.config.from_object(CustomConfig)
|
||||
|
||||
if AUTH_TYPE.lower() == "oidc": from flaskoidc import FlaskOIDC
|
||||
|
||||
app = init_app()
|
||||
app = Flask(__name__)
|
||||
LOG = create_logger(app)
|
||||
executor = Executor(app)
|
||||
|
||||
|
||||
11
server.py
11
server.py
@@ -14,15 +14,18 @@ STATIC_URL_PATH = "/static"
|
||||
|
||||
# Set Authentication type:
|
||||
if AUTH_TYPE.lower() == "oidc":
|
||||
# Load OIDC libraries
|
||||
from flaskoidc import FlaskOIDC
|
||||
from flaskoidc.config import BaseConfig
|
||||
|
||||
# Custom configuration class, a subclass of BaseConfig
|
||||
CustomConfig(BaseConfig):
|
||||
DEBUG = True
|
||||
|
||||
app = FlaskOIDC(__name__, static_url_path=STATIC_URL_PATH)
|
||||
LOG = create_logger(app)
|
||||
|
||||
app.config.from_object(CustomConfig)
|
||||
LOG.error("Loading OIDC libraries and configuring app...")
|
||||
# TODO:
|
||||
# If OIDC is enabled, add user info and a logout button to the top bar.
|
||||
|
||||
|
||||
elif AUTH_TYPE.lower() == "basic":
|
||||
app = Flask(__name__, static_url_path=STATIC_URL_PATH)
|
||||
|
||||
Reference in New Issue
Block a user