Files
nexusphp/app/Services/Captcha/CaptchaDriverInterface.php
Qi HU 9033eff8ea feat: Refine captcha configuration and drivers
Introduce a configurable captcha manager with drivers for image,
Cloudflare Turnstile, and Google reCAPTCHA, including fallback
behaviour.

Refactor login, signup, complain, and related flows to use the new
abstraction while simplifying the legacy image endpoint.

Document captcha environment options and restore classic defaults in
.env.example.

Signed-off-by: Qi HU <github@spcsky.com>
2025-10-11 23:38:27 +08:00

20 lines
364 B
PHP

<?php
namespace App\Services\Captcha;
interface CaptchaDriverInterface
{
public function isEnabled(): bool;
/**
* Render the captcha markup for HTML forms.
*/
public function render(array $context = []): string;
/**
* Verify the captcha response.
*/
public function verify(array $payload, array $context = []): bool;
}