Add support for registering with a threepid to the HS (get credentials from the client and check them against an ID server).

This commit is contained in:
David Baker 2014-09-03 18:22:27 +01:00
parent ddc16d8642
commit d6ecbbdf0a
3 changed files with 100 additions and 9 deletions

View file

@ -47,10 +47,15 @@ class RegisterRestServlet(RestServlet):
except KeyError:
pass # user_id is optional
threepidCreds = None
if 'threepidCreds' in register_json:
threepidCreds = register_json['threepidCreds']
handler = self.handlers.registration_handler
(user_id, token) = yield handler.register(
localpart=desired_user_id,
password=password)
password=password,
threepidCreds=threepidCreds)
result = {
"user_id": user_id,