summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-11-20 13:53:34 +0000
committerDavid Baker <dbkr@matrix.org>2014-11-20 13:53:34 +0000
commitdc60eee50e0a16ec24d10398c82f6fb64eec9ccc (patch)
tree00dcfae0a19aee5a8752d8f29959213f220682d7 /synapse/handlers
parentCaptchaServerHttpClient should extend the base, not matrix http client. (diff)
downloadsynapse-dc60eee50e0a16ec24d10398c82f6fb64eec9ccc.tar.xz
Refactor the HTTP clients a little.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/login.py4
-rw-r--r--synapse/handlers/register.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/synapse/handlers/login.py b/synapse/handlers/login.py
index 99d15261d4..1204dc3b8f 100644
--- a/synapse/handlers/login.py
+++ b/synapse/handlers/login.py
@@ -17,7 +17,7 @@ from twisted.internet import defer
 
 from ._base import BaseHandler
 from synapse.api.errors import LoginError, Codes
-from synapse.http.client import IdentityServerHttpClient
+from synapse.http.client import SimpleHttpClient
 from synapse.util.emailutils import EmailException
 import synapse.util.emailutils as emailutils
 
@@ -97,7 +97,7 @@ class LoginHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def _query_email(self, email):
-        httpCli = IdentityServerHttpClient(self.hs)
+        httpCli = SimpleHttpClient(self.hs)
         data = yield httpCli.get_json(
             'matrix.org:8090',  # TODO FIXME This should be configurable.
             "/_matrix/identity/api/v1/lookup?medium=email&address=" +
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index 7df9d9b82d..a39230bc76 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -22,7 +22,7 @@ from synapse.api.errors import (
 )
 from ._base import BaseHandler
 import synapse.util.stringutils as stringutils
-from synapse.http.client import IdentityServerHttpClient
+from synapse.http.client import SimpleHttpClient
 from synapse.http.client import CaptchaServerHttpClient
 
 import base64
@@ -159,7 +159,7 @@ class RegistrationHandler(BaseHandler):
     def _threepid_from_creds(self, creds):
         # TODO: get this from the homeserver rather than creating a new one for
         # each request
-        httpCli = IdentityServerHttpClient(self.hs)
+        httpCli = SimpleHttpClient(self.hs)
         # XXX: make this configurable!
         trustedIdServers = ['matrix.org:8090']
         if not creds['idServer'] in trustedIdServers:
@@ -178,7 +178,7 @@ class RegistrationHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def _bind_threepid(self, creds, mxid):
-        httpCli = IdentityServerHttpClient(self.hs)
+        httpCli = SimpleHttpClient(self.hs)
         data = yield httpCli.post_urlencoded_get_json(
             creds['idServer'],
             "/_matrix/identity/api/v1/3pid/bind",