RuntimeReCaptchaProvider
extends ReCaptchaProvider
in package
FinalYes
The library's provider takes both keys in its constructor (compiled into the DI container). This one asks {@see ReCaptchaRuntime} each time, so keys changed in the administration apply without rebuilding the container.
Table of Contents
Properties
Methods
- __construct() : mixed
- getSiteKey() : string
- validate() : ReCaptchaResponse|null
- The score threshold belongs to the active version (v3), so it is set right before each check.
- makeRequest() : string|null
Properties
$runtime read-only
private
ReCaptchaRuntime
$runtime
Methods
__construct()
public
__construct(ReCaptchaRuntime $runtime[, float $minimalScore = 0 ]) : mixed
Parameters
- $runtime : ReCaptchaRuntime
- $minimalScore : float = 0
getSiteKey()
public
getSiteKey() : string
Return values
stringvalidate()
The score threshold belongs to the active version (v3), so it is set right before each check.
public
validate(string $response) : ReCaptchaResponse|null
Parameters
- $response : string
Return values
ReCaptchaResponse|nullmakeRequest()
protected
makeRequest(string|null $response[, string|null $remoteIp = null ]) : string|null
Parameters
- $response : string|null
- $remoteIp : string|null = null