public static List<Descriptor<CaptchaSupport>> getCaptchaSupportDescriptors() { return CaptchaSupport.all(); }
/** * Validates the captcha. */ protected final boolean validateCaptcha(String text) { if (captchaSupport != null) { String id = Stapler.getCurrentRequest().getSession().getId(); return captchaSupport.validateCaptcha(id, text); } // If no Captcha Support then bogus validation always returns true return true; }
/** * Generates a captcha image. */ public final void doCaptcha(StaplerRequest req, StaplerResponse rsp) throws IOException { if (captchaSupport != null) { String id = req.getSession().getId(); rsp.setContentType("image/png"); // source: https://stackoverflow.com/a/3414217 rsp.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); rsp.setHeader("Pragma", "no-cache"); rsp.setHeader("Expires", "0"); captchaSupport.generateImage(id, rsp.getOutputStream()); } }
public CaptchaSupport superNewInstance(StaplerRequest req, JSONObject formData) throws FormException { return super.newInstance(req, formData); }
public void superCalcFillSettings(String field, Map<String, Object> attributes) { super.calcFillSettings(field, attributes); }
public boolean superConfigure(StaplerRequest req) throws FormException { return super.configure(req); }
public String superGetGlobalConfigPage() { return super.getGlobalConfigPage(); }
public Class<CaptchaSupport> superGetT() { return super.getT(); }
public String superGetDescriptorUrl() { return super.getDescriptorUrl(); }
public String superGetHelpFile(Klass<?> clazz, String fieldName) { return super.getHelpFile(clazz, fieldName); }
public synchronized void superSave() { super.save(); }
public PropertyType superGetPropertyType(String field) { return super.getPropertyType(field); }
public void superAddHelpFileRedirect(String fieldName, Class<? extends Describable> owner, String fieldNameToRedirectTo) { super.addHelpFileRedirect(fieldName, owner, fieldNameToRedirectTo); }
public String superGetConfigPage() { return super.getConfigPage(); }
public void superDoHelp(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { super.doHelp(req, rsp); }
public List<Descriptor<CaptchaSupport>> getCaptchaSupportDescriptors() { return CaptchaSupport.all(); }
public CaptchaSupport superNewInstance(StaplerRequest req) throws FormException { return super.newInstance(req); }
public static List<Descriptor<CaptchaSupport>> getCaptchaSupportDescriptors() { return CaptchaSupport.all(); }
public List<Descriptor<CaptchaSupport>> getCaptchaSupportDescriptors() { return CaptchaSupport.all(); }
public static List<Descriptor<CaptchaSupport>> getCaptchaSupportDescriptors() { return CaptchaSupport.all(); }