diff options
author | David Baker <dave@matrix.org> | 2015-03-30 18:13:10 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-03-30 18:13:10 +0100 |
commit | 59bf16eddcb793705ee6bc243a2158824f7e05c8 (patch) | |
tree | 70ebcd5084cddbc9a01d968b890960aba15bf91c /synapse/handlers/register.py | |
parent | pep8 (diff) | |
download | synapse-59bf16eddcb793705ee6bc243a2158824f7e05c8.tar.xz |
New registration for C/S API v2. Only ReCAPTCHA working currently.
Diffstat (limited to 'synapse/handlers/register.py')
-rw-r--r-- | synapse/handlers/register.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index c25e321099..542759a827 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -157,7 +157,11 @@ class RegistrationHandler(BaseHandler): @defer.inlineCallbacks def check_recaptcha(self, ip, private_key, challenge, response): - """Checks a recaptcha is correct.""" + """ + Checks a recaptcha is correct. + + Used only by c/s api v1 + """ captcha_response = yield self._validate_captcha( ip, @@ -282,6 +286,8 @@ class RegistrationHandler(BaseHandler): def _validate_captcha(self, ip_addr, private_key, challenge, response): """Validates the captcha provided. + Used only by c/s api v1 + Returns: dict: Containing 'valid'(bool) and 'error_url'(str) if invalid. @@ -299,6 +305,9 @@ class RegistrationHandler(BaseHandler): @defer.inlineCallbacks def _submit_captcha(self, ip_addr, private_key, challenge, response): + """ + Used only by c/s api v1 + """ # TODO: get this from the homeserver rather than creating a new one for # each request client = CaptchaServerHttpClient(self.hs) |