Support registration / login with phone number

Changes from https://github.com/matrix-org/synapse/pull/1971
This commit is contained in:
David Baker 2017-03-13 17:27:51 +00:00
parent 31f3ca1b2b
commit 73a5f06652
9 changed files with 395 additions and 50 deletions

View file

@ -192,6 +192,16 @@ def parse_json_object_from_request(request):
return content
def assert_params_in_request(body, required):
absent = []
for k in required:
if k not in body:
absent.append(k)
if len(absent) > 0:
raise SynapseError(400, "Missing params: %r" % absent, Codes.MISSING_PARAM)
class RestServlet(object):
""" A Synapse REST Servlet.