protected boolean parseCaptchaResponse(final HttpResponse response) throws Exception {
        try (val content = ((HttpEntityContainer) response).getEntity().getContent()) {
            val result = IOUtils.toString(content, StandardCharsets.UTF_8);
            if (StringUtils.isBlank(result)) {
                throw new IllegalArgumentException("Unable to parse empty entity response from " + recaptchaProperties.getVerifyUrl());
            }
            LOGGER.debug("Recaptcha verification response received: [{}]", result);
            val node = MAPPER.reader().readTree(result);
            if (node.has("score") && node.get("score").doubleValue() <= recaptchaProperties.getScore()) {
                LOGGER.warn("Recaptcha score received is less than the threshold score defined for CAS");
                return false;
            }
            if (node.has("success") && node.get("success").booleanValue()) {
                LOGGER.trace("Recaptcha has successfully verified the request");
                return true;
            }
        }
        return false;
    }
This is {@link BaseCaptchaValidator}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-captcha-core/src/main/java/org/apereo/cas/web/BaseCaptchaValidator.java