diff options
author | Erik Johnston <erik@matrix.org> | 2017-03-14 11:35:05 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-03-14 11:35:05 +0000 |
commit | bb256ac96f2a10b60708d5273bee5df2533f10b8 (patch) | |
tree | ae6d19a234b566ff4fc58ec1d7b47c9622843b2c /synapse/handlers/identity.py | |
parent | Add new storage function to slave store (diff) | |
parent | Merge pull request #1996 from matrix-org/erikj/fix_current_state (diff) | |
download | synapse-bb256ac96f2a10b60708d5273bee5df2533f10b8.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/public_list_speed
Diffstat (limited to 'synapse/handlers/identity.py')
-rw-r--r-- | synapse/handlers/identity.py | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py index 6a53c5eb47..559e5d5a71 100644 --- a/synapse/handlers/identity.py +++ b/synapse/handlers/identity.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd -# Copyright 2017 Vector Creations Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -151,7 +150,7 @@ class IdentityHandler(BaseHandler): params.update(kwargs) try: - data = yield self.http_client.post_json_get_json( + data = yield self.http_client.post_urlencoded_get_json( "https://%s%s" % ( id_server, "/_matrix/identity/api/v1/validate/email/requestToken" @@ -162,37 +161,3 @@ class IdentityHandler(BaseHandler): except CodeMessageException as e: logger.info("Proxied requestToken failed: %r", e) raise e - - @defer.inlineCallbacks - def requestMsisdnToken( - self, id_server, country, phone_number, - client_secret, send_attempt, **kwargs - ): - yield run_on_reactor() - - if not self._should_trust_id_server(id_server): - raise SynapseError( - 400, "Untrusted ID server '%s'" % id_server, - Codes.SERVER_NOT_TRUSTED - ) - - params = { - 'country': country, - 'phone_number': phone_number, - 'client_secret': client_secret, - 'send_attempt': send_attempt, - } - params.update(kwargs) - - try: - data = yield self.http_client.post_json_get_json( - "https://%s%s" % ( - id_server, - "/_matrix/identity/api/v1/validate/msisdn/requestToken" - ), - params - ) - defer.returnValue(data) - except CodeMessageException as e: - logger.info("Proxied requestToken failed: %r", e) - raise e |