(validate-recaptcha) ( response recaptcha -- valid? error )


Vocabulary
furnace.recaptcha.private

Inputs
responsean object
recaptchaan object


Outputs
valid?an object
erroran object


Definition


:: (validate-recaptcha)
( response recaptcha -- valid? error )
recaptcha secret-key>> :> secret-key remote-address get
host>> :> remote-ip H{
{ "secret" secret-key }
{ "response" response }
{ "remoteip" remote-ip }
} URL" https://www.google.com/recaptcha/api/siteverify"
http-post nip parse-recaptcha-response ;