Crates.io | mcaptcha-api-rs |
lib.rs | mcaptcha-api-rs |
version | 0.1.0 |
source | src |
created_at | 2024-01-02 19:54:35.91739 |
updated_at | 2024-01-02 19:54:35.91739 |
description | HTTP Library to interact with mCaptcha API |
homepage | https://mcaptcha.org |
repository | https://git.batsense.net/mCaptcha/mcaptcha-api-rs |
max_upload_size | |
id | 1086592 |
size | 27,389 |
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.
cargo add mcaptcha-api-rs
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());