* @param request the HttpServletRequest used in the confirmation
*/
public void setupConfirmation(HttpServletRequest request) {
Blog blog = (Blog)request.getAttribute(Constants.BLOG_KEY);
PluginProperties props = blog.getPluginProperties();
boolean keySuccess = true;
if (!props.hasProperty(RECAPTCHA_PUBLIC_KEY)) {
keySuccess = false;
log.error("failed to retrieve reCAPTCHA public API key");
}
if (!props.hasProperty(RECAPTCHA_PRIVATE_KEY)) {
keySuccess = false;
log.error("failed to retrieve reCAPTCHA private API key");
}
if (keySuccess) {
String publicKey = props.getProperty(RECAPTCHA_PUBLIC_KEY);
String privateKey = props.getProperty(RECAPTCHA_PRIVATE_KEY);
ReCaptcha c = ReCaptchaFactory.newReCaptcha(publicKey, privateKey, false);
request.getSession().setAttribute(CHALLENGE, c.createRecaptchaHtml(null, null));
} else {