Add tests for featured thumbnail generation; apply Pint formatting and related edits
This commit is contained in:
@@ -2,21 +2,32 @@
|
||||
|
||||
namespace App\Services\Security;
|
||||
|
||||
use App\Services\Security\Captcha\TurnstileCaptchaProvider;
|
||||
|
||||
class TurnstileVerifier
|
||||
{
|
||||
public function __construct(
|
||||
private readonly CaptchaVerifier $captchaVerifier,
|
||||
private readonly TurnstileCaptchaProvider $turnstileProvider,
|
||||
) {
|
||||
}
|
||||
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return $this->captchaVerifier->provider() === 'turnstile'
|
||||
&& $this->captchaVerifier->isEnabled();
|
||||
return $this->turnstileProvider->isEnabled();
|
||||
}
|
||||
|
||||
public function siteKey(): string
|
||||
{
|
||||
return $this->turnstileProvider->siteKey();
|
||||
}
|
||||
|
||||
public function scriptUrl(): string
|
||||
{
|
||||
return $this->turnstileProvider->scriptUrl();
|
||||
}
|
||||
|
||||
public function verify(string $token, ?string $ip = null): bool
|
||||
{
|
||||
return $this->captchaVerifier->verify($token, $ip);
|
||||
return $this->turnstileProvider->verify($token, $ip);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user