summary refs log tree commit diff
path: root/synapse/rest/client/v1/login.py
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <dawagner@gmail.com>2015-08-20 17:44:46 +0100
committerDaniel Wagner-Hall <dawagner@gmail.com>2015-08-20 17:44:46 +0100
commitb1e35eabf240c6231e5dcc6e8022f537e236829d (patch)
treef01b04d22e4d487bd61c96768154e5e4b6498b10 /synapse/rest/client/v1/login.py
parentMerge pull request #229 from matrix-org/auth (diff)
parentFix bad merge (diff)
downloadsynapse-b1e35eabf240c6231e5dcc6e8022f537e236829d.tar.xz
Merge pull request #240 from matrix-org/refresh
/tokenrefresh POST endpoint
Diffstat (limited to 'synapse/rest/client/v1/login.py')
-rw-r--r--synapse/rest/client/v1/login.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py
index 0d5eafd0fa..67323a16bb 100644
--- a/synapse/rest/client/v1/login.py
+++ b/synapse/rest/client/v1/login.py
@@ -85,13 +85,15 @@ class LoginRestServlet(ClientV1RestServlet):
             user_id = UserID.create(
                 user_id, self.hs.hostname).to_string()
 
-        token = yield self.handlers.auth_handler.login_with_password(
+        auth_handler = self.handlers.auth_handler
+        access_token, refresh_token = yield auth_handler.login_with_password(
             user_id=user_id,
             password=login_submission["password"])
 
         result = {
-            "user_id": user_id,  # may have changed
-            "access_token": token,
+            "user_id": login_submission["user"],  # may have changed
+            "access_token": access_token,
+            "refresh_token": refresh_token,
             "home_server": self.hs.hostname,
         }