Initialise user displayname from SAML2 data (#4272)

When we register a new user from SAML2 data, initialise their displayname
correctly.
This commit is contained in:
Richard van der Hoff 2018-12-07 14:44:46 +01:00 committed by GitHub
parent 35e13477cf
commit 30da50a5b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 39 additions and 15 deletions

View file

@ -66,6 +66,9 @@ class SAML2ResponseResource(Resource):
raise CodeMessageException(400, "uid not in SAML2 response")
username = saml2_auth.ava["uid"][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,
)