diff options
author | Aurélien Grimpard <aurelien@grimpard.net> | 2023-08-24 22:11:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 16:11:23 -0400 |
commit | aeeca2a62ebfb601efa7930acae0897c8d3e43df (patch) | |
tree | ed4401902543aebd0ac8090472fe01d4a68e993f /synapse/handlers/cas.py | |
parent | Bump anyhow from 1.0.72 to 1.0.75 (#16141) (diff) | |
download | synapse-aeeca2a62ebfb601efa7930acae0897c8d3e43df.tar.xz |
Add configuration setting for CAS protocol version (#15816)
Diffstat (limited to 'synapse/handlers/cas.py')
-rw-r--r-- | synapse/handlers/cas.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/cas.py b/synapse/handlers/cas.py index 5c71637038..a850545453 100644 --- a/synapse/handlers/cas.py +++ b/synapse/handlers/cas.py @@ -67,6 +67,7 @@ class CasHandler: self._cas_server_url = hs.config.cas.cas_server_url self._cas_service_url = hs.config.cas.cas_service_url + self._cas_protocol_version = hs.config.cas.cas_protocol_version self._cas_displayname_attribute = hs.config.cas.cas_displayname_attribute self._cas_required_attributes = hs.config.cas.cas_required_attributes @@ -121,7 +122,10 @@ class CasHandler: Returns: The parsed CAS response. """ - uri = self._cas_server_url + "/proxyValidate" + if self._cas_protocol_version == 3: + uri = self._cas_server_url + "/p3/proxyValidate" + else: + uri = self._cas_server_url + "/proxyValidate" args = { "ticket": ticket, "service": self._build_service_param(service_args), |