#captcha #response

recaptcha

recaptcha response verification

13 releases

0.5.0 Jun 26, 2021
0.4.1 Apr 4, 2020
0.4.0 Jan 22, 2020
0.3.1 Jan 11, 2019
0.0.6 Mar 8, 2015

#19 in #captcha

Download history 21/week @ 2024-07-20 25/week @ 2024-07-27 1/week @ 2024-08-03 6/week @ 2024-08-24 10/week @ 2024-09-21 12/week @ 2024-09-28

345 downloads per month

MIT license

7KB
125 lines

recaptcha-rs Build Status

Recaptcha-rs is a very simple library to verify recaptcha responses.

Installation

To use recaptcha-rs in your project you can add the following to your Cargo.toml:

[dependencies]
recaptcha = "0.5.0"

Usage

Verifying recaptcha responses is very easy:

extern crate recaptcha;

fn main() {
    let remote_ip = "123.123.123.123".parse().ok();
    let res = recaptcha::verify("your_private_key", "user_response", remote_ip).await;

    if res.is_ok() {
        println!("Success");
    } else {
        println!("Failure");
    }
}

Dependencies

~4–9MB
~167K SLoC