mirror of
https://github.com/element-hq/synapse
synced 2024-10-03 06:12:40 +00:00
s/nonce/txn_id/
This commit is contained in:
parent
64abb765dd
commit
3db9a4a26c
2 changed files with 4 additions and 4 deletions
|
@ -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:
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue