pep8
This commit is contained in:
parent
f96ab9d18d
commit
4eea5cf6c2
|
@ -42,8 +42,8 @@ class IdentityHandler(BaseHandler):
|
||||||
# each request
|
# each request
|
||||||
http_client = SimpleHttpClient(self.hs)
|
http_client = SimpleHttpClient(self.hs)
|
||||||
# XXX: make this configurable!
|
# XXX: make this configurable!
|
||||||
trustedIdServers = ['matrix.org', 'localhost:8090']
|
# trustedIdServers = ['matrix.org', 'localhost:8090']
|
||||||
#trustedIdServers = ['matrix.org']
|
trustedIdServers = ['matrix.org']
|
||||||
if not creds['idServer'] in trustedIdServers:
|
if not creds['idServer'] in trustedIdServers:
|
||||||
logger.warn('%s is not a trusted ID server: rejecting 3pid ' +
|
logger.warn('%s is not a trusted ID server: rejecting 3pid ' +
|
||||||
'credentials', creds['idServer'])
|
'credentials', creds['idServer'])
|
||||||
|
@ -86,4 +86,4 @@ class IdentityHandler(BaseHandler):
|
||||||
logger.debug("bound threepid %r to %s", creds, mxid)
|
logger.debug("bound threepid %r to %s", creds, mxid)
|
||||||
except CodeMessageException as e:
|
except CodeMessageException as e:
|
||||||
data = json.loads(e.msg)
|
data = json.loads(e.msg)
|
||||||
defer.returnValue(data)
|
defer.returnValue(data)
|
||||||
|
|
|
@ -80,4 +80,4 @@ class LoginHandler(BaseHandler):
|
||||||
yield self.store.user_add_threepid(
|
yield self.store.user_add_threepid(
|
||||||
user_id, medium, address, validated_at,
|
user_id, medium, address, validated_at,
|
||||||
self.hs.get_clock().time_msec()
|
self.hs.get_clock().time_msec()
|
||||||
)
|
)
|
||||||
|
|
|
@ -18,18 +18,15 @@ from twisted.internet import defer
|
||||||
|
|
||||||
from synapse.types import UserID
|
from synapse.types import UserID
|
||||||
from synapse.api.errors import (
|
from synapse.api.errors import (
|
||||||
AuthError, Codes, SynapseError, RegistrationError, InvalidCaptchaError,
|
AuthError, Codes, SynapseError, RegistrationError, InvalidCaptchaError
|
||||||
CodeMessageException
|
|
||||||
)
|
)
|
||||||
from ._base import BaseHandler
|
from ._base import BaseHandler
|
||||||
import synapse.util.stringutils as stringutils
|
import synapse.util.stringutils as stringutils
|
||||||
from synapse.util.async import run_on_reactor
|
from synapse.util.async import run_on_reactor
|
||||||
from synapse.http.client import SimpleHttpClient
|
|
||||||
from synapse.http.client import CaptchaServerHttpClient
|
from synapse.http.client import CaptchaServerHttpClient
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import bcrypt
|
import bcrypt
|
||||||
import json
|
|
||||||
import logging
|
import logging
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
|
|
|
@ -185,4 +185,4 @@ class RegistrationStore(SQLBaseStore):
|
||||||
}, {
|
}, {
|
||||||
"validated_at": validated_at,
|
"validated_at": validated_at,
|
||||||
"added_at": added_at,
|
"added_at": added_at,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue