letraceursnork/captcha-verifier

Common interface for CAPTCHA verification libraries

v0.1.0 2025-06-25 14:43 UTC

This package is auto-updated.

Last update: 2025-06-25 14:50:29 UTC


README

This repository contains all the interfaces related to proposed PSR CaptchaVerifierInterface

Discussion

Intendend usage

class SpecificCaptchaVerifier implements \LeTraceurSnork\Captcha\CaptchaVerifierInterface
{
    // some implementation here
}

$captcha_verifier = new SpecificCaptchaVerifier('CAPTCHA_SECRET_KEY');
$captcha_response = $captcha_verifier->verify('user_token');
if ($captcha_response->isSuccess()) {
    // ... Captcha successfully passed
}