Rust library to interact with mCaptcha API
Find a file
Aravinth Manivannan b2cdc81e30
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
fix: doctests
2024-01-03 00:02:43 +05:30
.reuse feat: reuse init 2024-01-02 23:55:54 +05:30
LICENSES feat: reuse init 2024-01-02 23:55:54 +05:30
scripts feat: reuse init 2024-01-02 23:55:54 +05:30
src fix: doctests 2024-01-03 00:02:43 +05:30
.env_sample feat: init 2024-01-02 19:20:55 +05:30
.gitignore feat: init 2024-01-02 19:20:55 +05:30
.woodpecker.yml fix: use dotenv to load test data 2024-01-02 20:10:06 +05:30
Cargo.toml feat: reuse init 2024-01-02 23:55:54 +05:30
Makefile fix: use dotenv to load test data 2024-01-02 20:10:06 +05:30
README.md feat: document usage 2024-01-02 23:50:55 +05:30
requirements.txt feat: init 2024-01-02 19:20:55 +05:30

status-badge


mcaptcha-api-rs: Library to interact with with mCaptcha API

This library provides a convenient interface to validate mCaptcha authorization tokens presented by Visitors against your mCaptcha instances. It uses reqwest, and native-tls under the hood to communicate with the API.

Install

cargo add mcaptcha-api-rs

Example

use url::Url;
use mcaptcha_api_rs::MCaptcha;

let mcaptcha = MCaptcha::new("sitekeyfromdashboard", "secretfromdashboadr", Url::parse("https://mcaptcha.example.com").unwrap());
assert!(mcaptcha.verify("authorizationtokenfromvisitor").await.unwrap());