diff options
author | Richard van der Hoff <richard@matrix.org> | 2021-01-13 11:12:28 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2021-01-13 20:22:41 +0000 |
commit | 420031906a04f7b5462347bf47730d4bc6cc8870 (patch) | |
tree | 3fc646278c05d56f51e32237ec320d593c892121 /synapse/handlers/auth.py | |
parent | Give the user a better error when they present bad SSO creds (diff) | |
download | synapse-420031906a04f7b5462347bf47730d4bc6cc8870.tar.xz |
Move `complete_sso_ui_auth` into SSOHandler
since we're hacking on this code anyway, may as well move it out of the cluttered AuthHandler.
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r-- | synapse/handlers/auth.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 4f881a439a..18cd2b62f0 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -263,10 +263,6 @@ class AuthHandler(BaseHandler): # authenticating for an operation to occur on their account. self._sso_auth_confirm_template = hs.config.sso_auth_confirm_template - # The following template is shown after a successful user interactive - # authentication session. It tells the user they can close the window. - self._sso_auth_success_template = hs.config.sso_auth_success_template - # The following template is shown during the SSO authentication process if # the account is deactivated. self._sso_account_deactivated_template = ( @@ -1394,27 +1390,6 @@ class AuthHandler(BaseHandler): description=session.description, redirect_url=redirect_url, ) - async def complete_sso_ui_auth( - self, registered_user_id: str, session_id: str, request: Request, - ): - """Having figured out a mxid for this user, complete the HTTP request - - Args: - registered_user_id: The registered user ID to complete SSO login for. - session_id: The ID of the user-interactive auth session. - request: The request to complete. - """ - # Mark the stage of the authentication as successful. - # Save the user who authenticated with SSO, this will be used to ensure - # that the account be modified is also the person who logged in. - await self.store.mark_ui_auth_stage_complete( - session_id, LoginType.SSO, registered_user_id - ) - - # Render the HTML and return. - html = self._sso_auth_success_template - respond_with_html(request, 200, html) - async def complete_sso_login( self, registered_user_id: str, |