support for CAPTCHAs
[mir.git] / source / mircoders / localizer / MirOpenPostingLocalizer.java
index 875309d..023837a 100755 (executable)
@@ -30,6 +30,7 @@
 package mircoders.localizer;
 
 import java.util.List;
+import java.awt.image.BufferedImage;
 
 import mir.session.Request;
 import mir.session.Session;
@@ -68,4 +69,15 @@ public interface MirOpenPostingLocalizer {
    * <emph>not</emph> used by default by the production subsystem
    */
   public boolean allowArticlePublication(EntityContent anArticle);
+
+
+  /**
+   * Generate a captcha with given id.
+   */
+  public Captcha generateCaptcha(String someId);
+
+  public interface Captcha {
+    BufferedImage getChallenge();
+    boolean validateAnswer(String anAnswer);
+  }
 }