Predictions 4.10.0.0

hirondelle.predict.util
Class Captcha

Object
  extended by hirondelle.predict.util.Captcha

public final class Captcha
extends Object

Utility class for CAPTCHA tasks.

CAPTCHA tools help prevent spam, by distinguishing human beings from automated bots. This class should be used anytime an Action needs to validate a user's input for a CAPTCHA form.

This application uses the RECAPTCHA service to prevent spam. It also uses the recaptcha4j Java library written by Soren Davidsen.


Constructor Summary
Captcha()
           
 
Method Summary
static void init(String aPrivateKey)
          Initialize this class with a private key value, required by the recaptcha tool.
static boolean isCaptchaValid(String aIpAddress, String aChallenge, String aResponse)
          Return true only if the user has supplied a valid response for the given challenge.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Captcha

public Captcha()
Method Detail

init

public static void init(String aPrivateKey)
Initialize this class with a private key value, required by the recaptcha tool. Each user of the recaptcha tool is given a private key, used to interact with the recaptcha server.

This method is called once upon startup.


isCaptchaValid

public static boolean isCaptchaValid(String aIpAddress,
                                     String aChallenge,
                                     String aResponse)
Return true only if the user has supplied a valid response for the given challenge.


Predictions 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.27