diff --git a/config.sample.toml b/conf/config.sample.toml similarity index 91% rename from config.sample.toml rename to conf/config.sample.toml index ab26fdac..4d52e904 100644 --- a/config.sample.toml +++ b/conf/config.sample.toml @@ -6,7 +6,8 @@ NAME = "MyDomain" LANGUAGE = "en" # Path to the RFC8414 metadata file -OAUTH2_METADATA_FILE = "oauth-authorization-server" +OAUTH2_METADATA_FILE = "conf/oauth-authorization-server" +OIDC_METADATA_FILE = "conf/openid_configuration" [LDAP] URI = "ldap://ldap" diff --git a/oauth-authorization-server b/conf/oauth-authorization-server similarity index 100% rename from oauth-authorization-server rename to conf/oauth-authorization-server diff --git a/web/__init__.py b/web/__init__.py index f06edba4..8ca5e72f 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -28,8 +28,10 @@ def create_app(config=None): app.config.from_mapping(config) elif "CONFIG" in os.environ: app.config.from_mapping(toml.load(os.environ.get("CONFIG"))) - elif os.path.exists("config.toml"): - app.config.from_mapping(toml.load("config.toml")) + elif os.path.exists("conf/config.toml"): + app.config.from_mapping(toml.load("conf/config.toml")) + else: + raise Exception("No configuration file found.") setup_app(app) return app