org.weborganic.bastille.recaptcha
Class ReCaptchaResult

java.lang.Object
  extended by org.weborganic.bastille.recaptcha.ReCaptchaResult

public final class ReCaptchaResult
extends Object

Returns the response from a ReCaptcha verification API call.

The fields correspond to the response returned by the verification API.

The messages are subject to change, and may be:

See Also:
ReCaptcha - Verify

Method Summary
 boolean isValid()
          Indicates whether the challenge was passed.
 String message()
          The reCaptcha error message.
static ReCaptchaResult parse(String response)
          Parses the response from the reCaptcha server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isValid

public boolean isValid()
Indicates whether the challenge was passed.

The according to the verification API server

Returns:
true if challenge was passed; false otherwise.

message

public String message()
The reCaptcha error message.

Returns:
The reCaptcha error message returned by the server.

parse

public static ReCaptchaResult parse(String response)
Parses the response from the reCaptcha server.

Parameters:
response - The response returned by the server
Returns:
the corresponding response object