From 3db9a4a26c3229182afcf20cbba6ba64d1a5865c Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 28 Sep 2015 16:43:35 +0100 Subject: [PATCH] s/nonce/txn_id/ --- synapse/handlers/auth.py | 4 ++-- synapse/rest/client/v1/login.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index f1db967203..203439b808 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -319,7 +319,7 @@ class AuthHandler(BaseHandler): defer.returnValue((user_id, access_token, refresh_token)) @defer.inlineCallbacks - def do_short_term_token_login(self, token, user_id, client_nonce): + def do_short_term_token_login(self, token, user_id, txn_id): macaroon_exact_caveats = [ "gen = 1", "type = %s" % (MACAROON_TYPE_LOGIN_TOKEN,), @@ -328,7 +328,7 @@ class AuthHandler(BaseHandler): macaroon_general_caveats = [ self._verify_macaroon_expiry, - lambda c: self._verify_nonce(c, user_id, client_nonce) + lambda c: self._verify_nonce(c, user_id, txn_id) ] try: diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py index d0d6f6f6e8..cb2140cdf7 100644 --- a/synapse/rest/client/v1/login.py +++ b/synapse/rest/client/v1/login.py @@ -77,9 +77,9 @@ class LoginRestServlet(ClientV1RestServlet): auth_handler = self.handlers.auth_handler token = login_submission["token"] user_id = login_submission["user"] - client_nonce = login_submission["nonce"] + txn_id = login_submission["txn_id"] result = yield auth_handler.do_short_term_token_login( - token, user_id, client_nonce + token, user_id, txn_id ) defer.returnValue((200, result)) else: