Class RecaptchaClient
java.lang.Object
com.ibm.security.access.recaptcha.RecaptchaClient
This is the ReCAPTCHA class exposed to the JavaScript mapping rules.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanThis wraps the real verify method and provides a simple yes/no response.static StringThis wraps the real verify method and return the serialsed JSON assessment from the provider.
-
Field Details
-
HttpClient_java_sourceCodeID
- See Also:
-
HttpClient_java_copyright
- See Also:
-
-
Constructor Details
-
RecaptchaClient
public RecaptchaClient()
-
-
Method Details
-
verify
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.
-
verifyV3
This wraps the real verify method and return the serialsed JSON assessment from the provider. As this method swallows any exceptions, it is intended to only be called from the JaveScript mapping rules.- 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:
- the serialized JSON response from the serviceLocation. If a response could not be parsed to JSON then an error is returned in the serialzied JSON string.
-