You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2020/09/07 02:40:46 UTC
[incubator-ponymail-foal] 01/05: add oauth config section
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 6ab968c32f069ecec0d71305d25c1cd5c008861d
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Sep 7 04:29:18 2020 +0200
add oauth config section
---
server/plugins/configuration.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/server/plugins/configuration.py b/server/plugins/configuration.py
index 65e5db4..a622fdf 100644
--- a/server/plugins/configuration.py
+++ b/server/plugins/configuration.py
@@ -14,6 +14,12 @@ class TaskConfig:
self.refresh_rate = int(subyaml.get("refresh_rate", 150))
+class OAuthConfig:
+ authoritative_domains: list
+
+ def __init__(self, subyaml: dict):
+ self.authoritative_domains = subyaml.get('authoritative_domains', [])
+
class DBConfig:
hostname: str
port: int
@@ -35,11 +41,13 @@ class Configuration:
server: ServerConfig
database: DBConfig
tasks: TaskConfig
+ oauth: OAuthConfig
def __init__(self, yml: dict):
self.server = ServerConfig(yml.get("server", {}))
self.database = DBConfig(yml.get("database", {}))
self.tasks = TaskConfig(yml.get("tasks", {}))
+ self.oauth = OAuthConfig(yml.get("oauth", {}))
class InterData: