mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 11:45:05 -04:00
Move access token deletion into auth handler
Also move duplicated deactivation code into the auth handler. I want to add some hooks when we deactivate an access token, so let's bring it all in here so that there's somewhere to put it.
This commit is contained in:
parent
a72e4e3e28
commit
dd13310fb8
6 changed files with 62 additions and 27 deletions
|
@ -36,6 +36,7 @@ class RegistrationHandler(BaseHandler):
|
|||
super(RegistrationHandler, self).__init__(hs)
|
||||
|
||||
self.auth = hs.get_auth()
|
||||
self._auth_handler = hs.get_auth_handler()
|
||||
self.profile_handler = hs.get_profile_handler()
|
||||
self.captcha_client = CaptchaServerHttpClient(hs)
|
||||
|
||||
|
@ -416,7 +417,7 @@ class RegistrationHandler(BaseHandler):
|
|||
create_profile_with_localpart=user.localpart,
|
||||
)
|
||||
else:
|
||||
yield self.store.user_delete_access_tokens(user_id=user_id)
|
||||
yield self._auth_handler.delete_access_tokens_for_user(user_id)
|
||||
yield self.store.add_access_token_to_user(user_id=user_id, token=token)
|
||||
|
||||
if displayname is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue