captcha-sdk
Unified server-side CAPTCHA verification for Rust.
captcha-sdk provides one provider-independent request, result, error model,
and verifier trait for Cloudflare Turnstile, hCaptcha, Google reCAPTCHA,
Friendly Captcha, CaptchaFox, MTCaptcha, Prosopo Procaptcha, and ALTCHA.
Status:
0.1.0is the initial API scaffold. The normalized core and provider configuration modules are present; provider HTTP adapters are not implemented yet. The proposed replacement API is documented as TARGET architecture / implementation pending; it does not describe the current ABI.
Features
turnstile— Cloudflare Turnstile adapter scaffoldhcaptcha— hCaptcha adapter scaffoldrecaptcha— Google reCAPTCHA adapter scaffoldfriendlycaptcha— Friendly Captcha v2 adapter scaffoldcaptchafox— CaptchaFox adapter scaffoldmtcaptcha— MTCaptcha adapter scaffoldprocaptcha— Prosopo Procaptcha adapter scaffoldprosopo— alias that enablesprocaptchaaltcha— ALTCHA local HMAC verification scaffoldall-providers— enables every provider module
No provider is enabled by default.
[]
= { = "0.1", = ["turnstile"] }
Current scaffold API
use ;
let result = invalid;
assert!;
assert_eq!;
This example describes only the current 0.1.0 scaffold. Its closed Provider
enum and bool-based VerificationResult are not the intended long-term
contract. See the target architecture for the
planned ProviderId, ProviderVerdict, evidence, policy, capabilities, and
third-party adapter model.
Development
For the configured nextest runner:
License
Licensed under the MIT License.