summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorQuentin Gliech <quenting@element.io>2024-04-25 14:50:12 +0200
committerGitHub <noreply@github.com>2024-04-25 12:50:12 +0000
commit2e92b718d5ea063af4b2dc9412dcd2ce625b4987 (patch)
tree9d916997bcd61eaf055c622b2aa27919faeb9cc9 /synapse/config
parentAdd type annotation to `visited_chains` (#17125) (diff)
downloadsynapse-2e92b718d5ea063af4b2dc9412dcd2ce625b4987.tar.xz
MSC4108 implementation (#17056)
Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/experimental.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/synapse/config/experimental.py b/synapse/config/experimental.py
index 353ae23f91..baa3580f29 100644
--- a/synapse/config/experimental.py
+++ b/synapse/config/experimental.py
@@ -413,12 +413,22 @@ class ExperimentalConfig(Config):
         )
 
         # MSC4108: Mechanism to allow OIDC sign in and E2EE set up via QR code
+        self.msc4108_enabled = experimental.get("msc4108_enabled", False)
+
         self.msc4108_delegation_endpoint: Optional[str] = experimental.get(
             "msc4108_delegation_endpoint", None
         )
 
-        if self.msc4108_delegation_endpoint is not None and not self.msc3861.enabled:
+        if (
+            self.msc4108_enabled or self.msc4108_delegation_endpoint is not None
+        ) and not self.msc3861.enabled:
             raise ConfigError(
                 "MSC4108 requires MSC3861 to be enabled",
                 ("experimental", "msc4108_delegation_endpoint"),
             )
+
+        if self.msc4108_delegation_endpoint is not None and self.msc4108_enabled:
+            raise ConfigError(
+                "You cannot have MSC4108 both enabled and delegated at the same time",
+                ("experimental", "msc4108_delegation_endpoint"),
+            )