diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-09-24 17:04:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-24 17:04:54 +0100 |
commit | 4f6bbe9d0d3c2fbc89a3548e4fe2fa859d6cbc16 (patch) | |
tree | 0c64c6ace7581c2f4e83c6b79159a11d35fc20e1 /synapse/rest | |
parent | remove unused parameter to get_user_id_by_threepid (#6099) (diff) | |
parent | Merge remote-tracking branch 'origin/develop' into rav/saml_mapping_work (diff) | |
download | synapse-4f6bbe9d0d3c2fbc89a3548e4fe2fa859d6cbc16.tar.xz |
Merge pull request #6037 from matrix-org/rav/saml_mapping_work
Update the process for mapping SAML2 users to matrix IDs
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v1/login.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py index 25a1b67092..9cddbc752a 100644 --- a/synapse/rest/client/v1/login.py +++ b/synapse/rest/client/v1/login.py @@ -29,6 +29,7 @@ from synapse.http.servlet import ( parse_json_object_from_request, parse_string, ) +from synapse.http.site import SynapseRequest from synapse.rest.client.v2_alpha._base import client_patterns from synapse.rest.well_known import WellKnownBuilder from synapse.types import UserID, map_username_to_mxid_localpart @@ -507,6 +508,19 @@ class SSOAuthHandler(object): localpart=localpart, default_display_name=user_display_name ) + self.complete_sso_login(registered_user_id, request, client_redirect_url) + + def complete_sso_login( + self, registered_user_id: str, request: SynapseRequest, client_redirect_url: str + ): + """Having figured out a mxid for this user, complete the HTTP request + + Args: + registered_user_id: + request: + client_redirect_url: + """ + login_token = self._macaroon_gen.generate_short_term_login_token( registered_user_id ) |