mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-20 02:24:07 -04:00
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:
parent
35e13477cf
commit
30da50a5b8
6 changed files with 39 additions and 15 deletions
|
@ -451,6 +451,7 @@ class SSOAuthHandler(object):
|
|||
@defer.inlineCallbacks
|
||||
def on_successful_auth(
|
||||
self, username, request, client_redirect_url,
|
||||
user_display_name=None,
|
||||
):
|
||||
"""Called once the user has successfully authenticated with the SSO.
|
||||
|
||||
|
@ -467,6 +468,9 @@ class SSOAuthHandler(object):
|
|||
client_redirect_url (unicode): the redirect_url the client gave us when
|
||||
it first started the process.
|
||||
|
||||
user_display_name (unicode|None): if set, and we have to register a new user,
|
||||
we will set their displayname to this.
|
||||
|
||||
Returns:
|
||||
Deferred[none]: Completes once we have handled the request.
|
||||
"""
|
||||
|
@ -478,6 +482,7 @@ class SSOAuthHandler(object):
|
|||
yield self._registration_handler.register(
|
||||
localpart=localpart,
|
||||
generate_token=False,
|
||||
default_display_name=user_display_name,
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue