From 325c5d37417d66287e9e54a2a706fed5f6727b4c Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 11 Jun 2019 19:42:48 +0100 Subject: try different attrs --- synapse/rest/saml2/response_resource.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/synapse/rest/saml2/response_resource.py b/synapse/rest/saml2/response_resource.py index 9aa04e6770..ae2af07ce5 100644 --- a/synapse/rest/saml2/response_resource.py +++ b/synapse/rest/saml2/response_resource.py @@ -62,12 +62,13 @@ class SAML2ResponseResource(Resource): if saml2_auth.not_signed: raise CodeMessageException(400, "SAML2 response was not signed") - if "http://schemas.auth0.com/name" not in saml2_auth.ava: - raise CodeMessageException(400, "name not in SAML2 response") + if "uid" not in saml2_auth.ava: + logger.info("ava: %r", saml2_auth.ava) + raise CodeMessageException(400, "uid not in SAML2 response") - username = saml2_auth.ava["http://schemas.auth0.com/name"][0] + username = saml2_auth.ava["uid"][0] - displayName = saml2_auth.ava.get("http://schemas.auth0.com/nickname", [None])[0] + displayName = saml2_auth.ava.get("displayName", [None])[0] return self._sso_auth_handler.on_successful_auth( username, request, relay_state, user_display_name=displayName, -- cgit 1.5.1