Use complete_sso_login from Synapse instead of re-implementing it

master
Brendan Abolivier 5 years ago
parent 198c5b9675
commit b1cb697206
No known key found for this signature in database
GPG Key ID: 1E015C145F1916CD

@ -171,13 +171,6 @@ class SubmitResource(AsyncResource):
del username_mapping_sessions[session_id] del username_mapping_sessions[session_id]
login_token = self._module_api.generate_short_term_login_token(
registered_user_id
)
redirect_url = _add_login_token_to_redirect_url(
session.client_redirect_url, login_token
)
# delete the cookie # delete the cookie
request.addCookie( request.addCookie(
SESSION_COOKIE_NAME, SESSION_COOKIE_NAME,
@ -185,8 +178,12 @@ class SubmitResource(AsyncResource):
expires=b"Thu, 01 Jan 1970 00:00:00 GMT", expires=b"Thu, 01 Jan 1970 00:00:00 GMT",
path=b"/", path=b"/",
) )
request.redirect(redirect_url)
request.finish() self._module_api.complete_sso_login(
registered_user_id,
request,
session.client_redirect_url,
)
class AvailabilityCheckResource(AsyncResource): class AvailabilityCheckResource(AsyncResource):

Loading…
Cancel
Save