recaptcha-0.1.0.4: Functions for using the reCAPTCHA service in web applications.

Safe Haskell | None
Language | Haskell98

Network.Captcha.ReCaptcha

Synopsis

- captchaFields :: String -> Maybe String -> Html
- validateCaptcha :: String -> String -> String -> String -> IO (Either String ())

# Documentation

captchaFields Source #

Arguments

:: String | reCAPTCHA public key
-> Maybe String | `Nothing` or `Just` an error message returned by previous validate attempt
-> Html |

Returns HTML element to be inserted in the form for which a CAPTCHA is wanted.

validateCaptcha Source #

Arguments

:: String | reCAPTCHA private key
-> String | IP address of the user who solved the CAPTCHA
-> String | value of the recaptcha_challenge_field
-> String | value of the recaptcha_response_field
-> IO (Either String ()) | `Left` error message, or `Right ()` for success

Verify a CAPTCHA.