Captcha-reCAPTCHA-V3
view release on metacpan or search on metacpan
Requires just only response key being got from Google reCAPTCHA API.
**DO NOT** add remote address. there is no function for remote address within reCAPTCHA v3.
my $content = $rc->verify($param{$rc});
The default _query\_name_ is 'g-recaptcha-response' and it is stocked in constructor.
But now string-context provides you to get _query\_name_ so we don't have to care about it.
The response contains JSON so it returns decoded value from JSON.
unless ( $content->{'success'} ) {
# code for failing like below
die 'fail to verify reCAPTCHA: ', @{ $content->{'error-codes'} }, "\n";
}
### deny\_by\_score( response => _response_, \[ score => _expected_ \] )
reCAPTCHA v3 responses have score whether the request was by bot.
lib/Captcha/reCAPTCHA/V3.pm view on Meta::CPAN
Requires just only response key being got from Google reCAPTCHA API.
B<DO NOT> add remote address. there is no function for remote address within reCAPTCHA v3.
my $content = $rc->verify($param{$rc});
The default I<query_name> is 'g-recaptcha-response' and it is stocked in constructor.
But now string-context provides you to get I<query_name> so we don't have to care about it.
The response contains JSON so it returns decoded value from JSON.
unless ( $content->{'success'} ) {
# code for failing like below
die 'fail to verify reCAPTCHA: ', @{ $content->{'error-codes'} }, "\n";
}
=head3 deny_by_score( response => I<response>, [ score => I<expected> ] )
reCAPTCHA v3 responses have score whether the request was by bot.
( run in 5.823 seconds using v1.01-cache-2.11-cpan-a5162978ef8 )