Class RecaptchaClient


  • public class RecaptchaClient
    extends java.lang.Object
    This is the ReCAPTCHA class exposed to the JavaScript mapping rules.
    • Constructor Summary

      Constructors 
      Constructor Description
      RecaptchaClient()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean verify​(java.lang.String response, java.lang.String secret, java.lang.String serviceLocation)
      This wraps the real verify method and provides a simple yes/no response.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • HttpClient_java_sourceCodeID

        public static final java.lang.String HttpClient_java_sourceCodeID
        See Also:
        Constant Field Values
      • HttpClient_java_copyright

        public static final java.lang.String HttpClient_java_copyright
    • Constructor Detail

      • RecaptchaClient

        public RecaptchaClient()
    • Method Detail

      • verify

        public static boolean verify​(java.lang.String response,
                                     java.lang.String secret,
                                     java.lang.String serviceLocation)
        This wraps the real verify method and provides a simple yes/no response. As this method swallows any exceptions, it is intended to only be called from the JaveScript mapping rules. If you are intending to verify ReCAPTCHA internally, please see RecaptchaClientInternal.verify(...)
        Parameters:
        response - The CAPTCHA response collected from the client.
        secret - The API secret.
        serviceLocation - The location of the ReCAPTCHA endpoint. (Passing null will use the default value.)
        Returns:
        true if the captcha verified successfully, false if there were errors or the captcha did not verify.