diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-07-08 19:01:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-08 19:01:08 +0100 |
commit | 824707383bea618ea809a0f13cf72168b87184f9 (patch) | |
tree | 4480c95aab06f81c46bc4caf4c327dea36ed47d8 /synapse/rest/client/v1/login.py | |
parent | Unblacklist some user_directory sytests (#5637) (diff) | |
download | synapse-824707383bea618ea809a0f13cf72168b87184f9.tar.xz |
Remove access-token support from RegistrationHandler.register (#5641)
Nothing uses this now, so we can remove the dead code, and clean up the API. Since we're changing the shape of the return value anyway, we take the opportunity to give the method a better name.
Diffstat (limited to 'synapse/rest/client/v1/login.py')
-rw-r--r-- | synapse/rest/client/v1/login.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py index b13043cc64..0d05945f0a 100644 --- a/synapse/rest/client/v1/login.py +++ b/synapse/rest/client/v1/login.py @@ -314,10 +314,8 @@ class LoginRestServlet(RestServlet): registered_user_id = yield self.auth_handler.check_user_exists(user_id) if not registered_user_id: - registered_user_id, _ = ( - yield self.registration_handler.register( - localpart=user, generate_token=False - ) + registered_user_id = yield self.registration_handler.register_user( + localpart=user ) result = yield self._register_device_with_callback( @@ -505,12 +503,8 @@ class SSOAuthHandler(object): user_id = UserID(localpart, self._hostname).to_string() registered_user_id = yield self._auth_handler.check_user_exists(user_id) if not registered_user_id: - registered_user_id, _ = ( - yield self._registration_handler.register( - localpart=localpart, - generate_token=False, - default_display_name=user_display_name, - ) + registered_user_id = yield self._registration_handler.register_user( + localpart=localpart, default_display_name=user_display_name ) login_token = self._macaroon_gen.generate_short_term_login_token( |