@Override
    public boolean validate(final String recaptchaResponse, final String userAgent) {
        HttpResponse response = null;
        try {
            response = executeCaptchaVerification(recaptchaResponse, userAgent);
            if (response != null && response.getCode() == HttpStatus.OK.value()) {
                return parseCaptchaResponse(response);
            }
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        } finally {
            HttpUtils.close(response);
        }
        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