6 releases

0.1.5 Mar 24, 2024
0.1.4 Mar 6, 2024
0.1.3 Oct 18, 2023

#1206 in Web programming

Download history 4/week @ 2024-07-22 6/week @ 2024-07-29 5/week @ 2024-08-05 9/week @ 2024-08-19 5/week @ 2024-08-26 8/week @ 2024-09-02 7/week @ 2024-09-16 76/week @ 2024-09-23 58/week @ 2024-09-30 102/week @ 2024-10-07 91/week @ 2024-10-14 29/week @ 2024-10-21 199/week @ 2024-10-28 157/week @ 2024-11-04

490 downloads per month

MIT license

10KB
111 lines

Crates.io API dependency status Build and Test codecov

recaptcha-verify

Simple, bare-minimum recaptcha verifier helper

Quick Start

This library is supposed to be a (near) drop-in replacement for recaptcha-rs. The usage is nearly (but not completely) identical. Here however we use rustls by default, but you could choose from the following features:

  • default-tls - enforces default-tls feature in reqwest
  • native-tls - enforces native-tls feature in reqwest
  • rustls-tls - enabled by default

Another key difference is that this library uses tokio 1 as dev dependency and more recent versions of reqwest and serde.

Changes in 0.1.3

One important change in 0.1.3 is the fact that instead of string we now pass the whole reqwest::Error in RecaptchaError::HttpError. If you previously used the String containing variant, please migrate to using reqwest::Error.

Example

use recaptcha_verify::{RecaptchaError, verify};

let res:Result<(), RecaptchaError> = verify("secret", "token", None).await;

License

This library (recaptcha-verify) is open sourced under the MIT License.

Dependencies

~5–18MB
~254K SLoC