summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-06-11 00:03:57 +0100
committerRichard van der Hoff <richard@matrix.org>2019-06-11 00:03:57 +0100
commit426049247b271543a3a01e934851aefa727ba204 (patch)
tree58ff195c6afc92fded65c89d48c888bc22ad3853 /synapse/server.py
parentMerge remote-tracking branch 'origin/develop' into rav/saml2_client (diff)
downloadsynapse-426049247b271543a3a01e934851aefa727ba204.tar.xz
Code cleanups and simplifications.
Also: share the saml client between redirect and response handlers.
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 9229a68a8d..0eb8968674 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -189,6 +189,7 @@ class HomeServer(object):
         'registration_handler',
         'account_validity_handler',
         'event_client_serializer',
+        'saml_client',
     ]
 
     REQUIRED_ON_MASTER_STARTUP = [
@@ -522,6 +523,10 @@ class HomeServer(object):
     def build_event_client_serializer(self):
         return EventClientSerializer(self)
 
+    def build_saml_client(self):
+        from saml2.client import Saml2Client
+        return Saml2Client(self.config.saml2_sp_config)
+
     def remove_pusher(self, app_id, push_key, user_id):
         return self.get_pusherpool().remove_pusher(app_id, push_key, user_id)