summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorQuentin Gliech <quenting@element.io>2022-09-13 17:54:32 +0200
committerPatrick Cloke <clokep@users.noreply.github.com>2023-05-30 09:43:06 -0400
commit765244faeef9e20c573d2c7935f05f76aeca1c28 (patch)
treeadaa248f3af0fd08e6e3341a8960b0af962d7806 /synapse/server.py
parentMake the api.auth.Auth a Protocol (diff)
downloadsynapse-765244faeef9e20c573d2c7935f05f76aeca1c28.tar.xz
Initial MSC3964 support: delegation of auth to OIDC server
Diffstat (limited to '')
-rw-r--r--synapse/server.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py
index df88af12a9..1c82500f30 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -428,6 +428,10 @@ class HomeServer(metaclass=abc.ABCMeta):
 
     @cache_in_self
     def get_auth(self) -> Auth:
+        if self.config.auth.oauth_delegation_enabled:
+            from synapse.api.auth.oauth_delegated import OAuthDelegatedAuth
+
+            return OAuthDelegatedAuth(self)
         return InternalAuth(self)
 
     @cache_in_self