s/nonce/txn_id/

This commit is contained in:
Erik Johnston 2015-09-28 16:43:35 +01:00
parent 64abb765dd
commit 3db9a4a26c
2 changed files with 4 additions and 4 deletions

View file

@ -319,7 +319,7 @@ class AuthHandler(BaseHandler):
defer.returnValue((user_id, access_token, refresh_token)) defer.returnValue((user_id, access_token, refresh_token))
@defer.inlineCallbacks @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 = [ macaroon_exact_caveats = [
"gen = 1", "gen = 1",
"type = %s" % (MACAROON_TYPE_LOGIN_TOKEN,), "type = %s" % (MACAROON_TYPE_LOGIN_TOKEN,),
@ -328,7 +328,7 @@ class AuthHandler(BaseHandler):
macaroon_general_caveats = [ macaroon_general_caveats = [
self._verify_macaroon_expiry, 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: try:

View file

@ -77,9 +77,9 @@ class LoginRestServlet(ClientV1RestServlet):
auth_handler = self.handlers.auth_handler auth_handler = self.handlers.auth_handler
token = login_submission["token"] token = login_submission["token"]
user_id = login_submission["user"] 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( result = yield auth_handler.do_short_term_token_login(
token, user_id, client_nonce token, user_id, txn_id
) )
defer.returnValue((200, result)) defer.returnValue((200, result))
else: else: