diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2016-07-19 15:53:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-19 15:53:04 +0100 |
commit | 9a7a77a22a8571a2300a520695495c97ab09b287 (patch) | |
tree | 43017890e8ab8e44d4db05ccbe9f365c8e9350ea /synapse/rest/client/v2_alpha/tokenrefresh.py | |
parent | Merge pull request #930 from matrix-org/markjh/handlers (diff) | |
parent | schema fix (diff) | |
download | synapse-9a7a77a22a8571a2300a520695495c97ab09b287.tar.xz |
Merge pull request #929 from matrix-org/rav/support_deviceid_in_login
Add device_id support to /login
Diffstat (limited to 'synapse/rest/client/v2_alpha/tokenrefresh.py')
-rw-r--r-- | synapse/rest/client/v2_alpha/tokenrefresh.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/rest/client/v2_alpha/tokenrefresh.py b/synapse/rest/client/v2_alpha/tokenrefresh.py index 8270e8787f..0d312c91d4 100644 --- a/synapse/rest/client/v2_alpha/tokenrefresh.py +++ b/synapse/rest/client/v2_alpha/tokenrefresh.py @@ -39,9 +39,13 @@ class TokenRefreshRestServlet(RestServlet): try: old_refresh_token = body["refresh_token"] auth_handler = self.hs.get_auth_handler() - (user_id, new_refresh_token) = yield self.store.exchange_refresh_token( - old_refresh_token, auth_handler.generate_refresh_token) - new_access_token = yield auth_handler.issue_access_token(user_id) + refresh_result = yield self.store.exchange_refresh_token( + old_refresh_token, auth_handler.generate_refresh_token + ) + (user_id, new_refresh_token, device_id) = refresh_result + new_access_token = yield auth_handler.issue_access_token( + user_id, device_id + ) defer.returnValue((200, { "access_token": new_access_token, "refresh_token": new_refresh_token, |