'Checks a recaptcha is correct.
Used only by c/s api v1'

@defer.inlineCallbacks
def check_recaptcha(self, ip, private_key, challenge, response):

    captcha_response = (yield self._validate_captcha(ip, private_key, challenge, response))
    if (not captcha_response['valid']):
        logger.info('Invalid    captcha    entered    from    %s.    Error:    %s', ip, captcha_response['error_url'])
        raise InvalidCaptchaError(error_url=captcha_response['error_url'])
    else:
        logger.info('Valid    captcha    entered    from    %s', ip)
