summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorGabriel Rodríguez <gabrc52@gmail.com>2023-08-11 16:15:17 -0400
committerGitHub <noreply@github.com>2023-08-11 20:15:17 +0000
commit9ff84bccbb152460913d63d4b8e9dffc220adfea (patch)
tree2ccf3015f1bc8677c89831c0c1a79fc0aec51b02 /synapse/handlers
parentAdd linearizer on user ID to push rule PUT/DELETE requests (#16052) (diff)
downloadsynapse-9ff84bccbb152460913d63d4b8e9dffc220adfea.tar.xz
Allow customizing IdP name and icon for SAML and CAS (#16094)
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/cas.py11
-rw-r--r--synapse/handlers/saml.py11
2 files changed, 12 insertions, 10 deletions
diff --git a/synapse/handlers/cas.py b/synapse/handlers/cas.py
index fc467bc7c1..5c71637038 100644
--- a/synapse/handlers/cas.py
+++ b/synapse/handlers/cas.py
@@ -76,12 +76,13 @@ class CasHandler:
         self.idp_id = "cas"
 
         # user-facing name of this auth provider
-        self.idp_name = "CAS"
+        self.idp_name = hs.config.cas.idp_name
 
-        # we do not currently support brands/icons for CAS auth, but this is required by
-        # the SsoIdentityProvider protocol type.
-        self.idp_icon = None
-        self.idp_brand = None
+        # MXC URI for icon for this auth provider
+        self.idp_icon = hs.config.cas.idp_icon
+
+        # optional brand identifier for this auth provider
+        self.idp_brand = hs.config.cas.idp_brand
 
         self._sso_handler = hs.get_sso_handler()
 
diff --git a/synapse/handlers/saml.py b/synapse/handlers/saml.py
index 6083c9f4b5..d00035c332 100644
--- a/synapse/handlers/saml.py
+++ b/synapse/handlers/saml.py
@@ -74,12 +74,13 @@ class SamlHandler:
         self.idp_id = "saml"
 
         # user-facing name of this auth provider
-        self.idp_name = "SAML"
+        self.idp_name = hs.config.saml2.idp_name
 
-        # we do not currently support icons/brands for SAML auth, but this is required by
-        # the SsoIdentityProvider protocol type.
-        self.idp_icon = None
-        self.idp_brand = None
+        # MXC URI for icon for this auth provider
+        self.idp_icon = hs.config.saml2.idp_icon
+
+        # optional brand identifier for this auth provider
+        self.idp_brand = hs.config.saml2.idp_brand
 
         # a map from saml session id to Saml2SessionData object
         self._outstanding_requests_dict: Dict[str, Saml2SessionData] = {}