Creates a new instance.
Creates a new instance.
The Recaptcha settings
The response parser to use
The web service client to use
High level API (using Play forms).
High level API (using Play forms).
Binds form data from the request, and if valid then verifies the recaptcha response, by invoking the Google Recaptcha verify web service (API v2) in a reactive manner. Possible errors include:
Apart from generic binding error, the recaptcha errors are populated against the artificial
form field key formErrorKey
, handled by the recaptcha view template tags.
The form
Implicit - The current web request
Implicit - The execution context used for futures
A future that will be the form to use, either populated with an error or success
IllegalStateException
Developer errors that shouldn't happen - no recaptcha
challenge, or multiple challenges or responses found
Low level API (independent of Play form and request APIs).
Low level API (independent of Play form and request APIs).
Verifies whether a recaptcha response is valid, by invoking the Google Recaptcha API version 2 verify web service in a reactive manner.
The recaptcha response, to verify
The IP address of the end user
Implicit - The execution context used for futures
A future that will be either an Error (with a code) or Success
Verifies whether a recaptcha response is valid, by invoking the Google Recaptcha verify web service.