class recaptcha_v3 extends captcha_abstract

Google reCAPTCHA v3 plugin.

Constants

CURL

Possible request methods to verify the token.

POST

SOCKET

GOOGLE

Possible domain names to load the script and verify the token.

RECAPTCHA

RECAPTCHA_CN

Properties

$confirm_id from  captcha_abstract
$confirm_code from  captcha_abstract
$code from  captcha_abstract
$seed from  captcha_abstract
$attempts from  captcha_abstract
$type from  captcha_abstract
$solved from  captcha_abstract
$captcha_vars from  captcha_abstract
protected string $service_name from  captcha_abstract
static string[] $supported_domains
static protected array $actions

Methods

init($type)

Initialize this CAPTCHA plugin.

execute_demo()

Execute demo.

execute()

Execute.

get_template()

Get the template for this CAPTCHA plugin.

get_demo_template($id)

Create the ACP page for previewing this CAPTCHA plugin.

get_hidden_fields()

No description

garbage_collect($type)

No description

uninstall()

No description

install()

No description

validate()

Validate the user's input.

generate_code()

The old way to generate code, suitable for GD and non-GD. Resets the internal state.

regenerate_code()

New Question, if desired.

new_attempt()

New Question, if desired.

load_code()

Look up everything we need for painting&checking.

check_code()

No description

get_attempt_count()

No description

reset()

No description

is_solved()

No description

has_config()

Indicator that this CAPTCHA plugin requires configuration.

string
get_service_name()

No description

set_name(string $name)

Set the name of the plugin

string
get_generator_class()

Get generator class.

string
get_login_error_attempts()

Get language variable for error message when CAPTCHA is being shown due to exceeding the maximum number of login attempts

static array
get_actions()

Get CAPTCHA types mapped to their action.

string
get_name()

Get CAPTCHA plugin name.

bool
is_available()

Whether or not this CAPTCHA plugin is available and setup.

void
acp_page(string $id, acp_captcha $module)

Create the ACP page for configuring this CAPTCHA plugin.

bool|string
recaptcha_verify_token()

Validate the token returned by Google reCAPTCHA v3.

Details

at line 123
init($type)

Initialize this CAPTCHA plugin.

Parameters

$type

at line 80
execute_demo()

Execute demo.

Not needed by this CAPTCHA plugin.

at line 69
execute()

Execute.

Not needed by this CAPTCHA plugin.

at line 256
get_template()

Get the template for this CAPTCHA plugin.

at line 246
get_demo_template($id)

Create the ACP page for previewing this CAPTCHA plugin.

Parameters

$id

in captcha_abstract at line 139
get_hidden_fields()

No description

in captcha_abstract at line 152
garbage_collect($type)

No description

Parameters

$type

in captcha_abstract at line 182
uninstall()

No description

in captcha_abstract at line 187
install()

No description

at line 298
validate()

Validate the user's input.

in captcha_abstract at line 233
generate_code()

The old way to generate code, suitable for GD and non-GD. Resets the internal state.

in captcha_abstract at line 257
regenerate_code()

New Question, if desired.

in captcha_abstract at line 279
new_attempt()

New Question, if desired.

in captcha_abstract at line 302
load_code()

Look up everything we need for painting&checking.

in captcha_abstract at line 326
check_code()

No description

in captcha_abstract at line 331
get_attempt_count()

No description

in captcha_abstract at line 336
reset()

No description

in captcha_abstract at line 349
is_solved()

No description

at line 112
has_config()

Indicator that this CAPTCHA plugin requires configuration.

in captcha_abstract at line 371
string get_service_name()

No description

Return Value

string

the name of the service corresponding to the plugin

in captcha_abstract at line 381
set_name(string $name)

Set the name of the plugin

Parameters

string $name

at line 92
string get_generator_class()

Get generator class.

Not needed by this CAPTCHA plugin.

Return Value

string

the name of the class used to generate the captcha

Exceptions

Exception

at line 373
string get_login_error_attempts()

Get language variable for error message when CAPTCHA is being shown due to exceeding the maximum number of login attempts

Return Value

string

at line 57
static array get_actions()

Get CAPTCHA types mapped to their action.

Return Value

array

at line 102
string get_name()

Get CAPTCHA plugin name.

Return Value

string

at line 140
bool is_available()

Whether or not this CAPTCHA plugin is available and setup.

Return Value

bool

at line 160
void acp_page(string $id, acp_captcha $module)

Create the ACP page for configuring this CAPTCHA plugin.

Parameters

string $id

The ACP module identifier

acp_captcha $module

The ACP module basename

Return Value

void

at line 313
protected bool|string recaptcha_verify_token()

Validate the token returned by Google reCAPTCHA v3.

Return Value

bool|string

False on success, string containing the error otherwise