diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-11-23 13:28:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-23 13:28:03 -0500 |
commit | 6fde6aa9c02d35e0a908437ea49b275df9b58427 (patch) | |
tree | 759d0114718fc2f8d58cd94a7776690ff6538ad6 /synapse/handlers/saml_handler.py | |
parent | Fix synctl and duplicate worker spawning (#8798) (diff) | |
download | synapse-6fde6aa9c02d35e0a908437ea49b275df9b58427.tar.xz |
Properly report user-agent/IP during registration of SSO users. (#8784)
This also expands type-hints to the SSO and registration code. Refactors the CAS code to more closely match OIDC/SAML.
Diffstat (limited to 'synapse/handlers/saml_handler.py')
-rw-r--r-- | synapse/handlers/saml_handler.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/saml_handler.py b/synapse/handlers/saml_handler.py index f4e8cbeac8..37ab42f050 100644 --- a/synapse/handlers/saml_handler.py +++ b/synapse/handlers/saml_handler.py @@ -39,7 +39,7 @@ from synapse.util.async_helpers import Linearizer from synapse.util.iterutils import chunk_seq if TYPE_CHECKING: - import synapse.server + from synapse.server import HomeServer logger = logging.getLogger(__name__) @@ -56,7 +56,7 @@ class Saml2SessionData: class SamlHandler(BaseHandler): - def __init__(self, hs: "synapse.server.HomeServer"): + def __init__(self, hs: "HomeServer"): super().__init__(hs) self._saml_client = Saml2Client(hs.config.saml2_sp_config) self._saml_idp_entityid = hs.config.saml2_idp_entityid @@ -330,7 +330,7 @@ class SamlHandler(BaseHandler): localpart=localpart, default_display_name=displayname, bind_emails=emails, - user_agent_ips=(user_agent, ip_address), + user_agent_ips=[(user_agent, ip_address)], ) await self.store.record_user_external_id( |