ChallengeSettings
Corex\Security\ChallengeSettings · class · Core layer
The site-wide captcha settings a token is judged against, read from stored configuration and never from the request: the provider in use, the score a reCAPTCHA v3 token must reach, and the hostnames a token may come from (by default this site’s own). Shared by every CoreX form that checks a token, so a form drawn by the forms plugin and one drawn by an add-on are judged alike (spec 071, spec 115).
Public API
Section titled “Public API”__construct(ConfigInterface $config)
Section titled “__construct(ConfigInterface $config)”providerConfigured(): bool
Section titled “providerConfigured(): bool”A provider is chosen and its secret entered: a form needs the provider’s check.
widgetProvider(): string
Section titled “widgetProvider(): string”The provider whose widget a protected form shows, or ” when the provider shows none.
siteKey(): string
Section titled “siteKey(): string”The key the provider’s widget is drawn with. It is public by design; the secret is not.
threshold(): float
Section titled “threshold(): float”clamp(float $threshold): float
Section titled “clamp(float $threshold): float”Constrain a score threshold to the provider-supported range.