diff options
author | David Baker <dbkr@users.noreply.github.com> | 2016-07-20 11:03:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-20 11:03:33 +0100 |
commit | e967bc86e7bb90aeebb4ea2e4161d0049f1fefcc (patch) | |
tree | bdfdec01757bad35e439652a2ade1bcc78aa10da /synapse/rest/client/v1 | |
parent | Merge pull request #922 from matrix-org/erikj/file_api2 (diff) | |
parent | Further registration refactoring (diff) | |
download | synapse-e967bc86e7bb90aeebb4ea2e4161d0049f1fefcc.tar.xz |
Merge pull request #932 from matrix-org/rav/register_refactor
Further registration refactoring
Diffstat (limited to 'synapse/rest/client/v1')
-rw-r--r-- | synapse/rest/client/v1/register.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/register.py b/synapse/rest/client/v1/register.py index 8e1f1b7845..28b59952c3 100644 --- a/synapse/rest/client/v1/register.py +++ b/synapse/rest/client/v1/register.py @@ -60,6 +60,7 @@ class RegisterRestServlet(ClientV1RestServlet): # TODO: persistent storage self.sessions = {} self.enable_registration = hs.config.enable_registration + self.auth_handler = hs.get_auth_handler() def on_GET(self, request): if self.hs.config.enable_registration_captcha: @@ -299,9 +300,10 @@ class RegisterRestServlet(ClientV1RestServlet): user_localpart = register_json["user"].encode("utf-8") handler = self.handlers.registration_handler - (user_id, token) = yield handler.appservice_register( + user_id = yield handler.appservice_register( user_localpart, as_token ) + token = yield self.auth_handler.issue_access_token(user_id) self._remove_session(session) defer.returnValue({ "user_id": user_id, |