-
Notifications
You must be signed in to change notification settings - Fork 3
/
Settings.php
79 lines (75 loc) · 2.44 KB
/
Settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* This code is licensed under AGPLv3 license or Afterlogic Software License
* if commercial version of the product was purchased.
* For full statements of the licenses see LICENSE-AFTERLOGIC and LICENSE-AGPL3 files.
*/
namespace Aurora\Modules\RecaptchaWebclientPlugin;
use Aurora\System\SettingsProperty;
use Aurora\Modules\RecaptchaWebclientPlugin\Enums;
/**
* @property bool $Disabled
* @property string $PublicKey
* @property string $PrivateKey
* @property int $LimitCount
* @property array $WhitelistIPs
* @property bool $IncludeInMobile
* @property bool $IncludeInDesktop
* @property string $RequestMethod
*/
class Settings extends \Aurora\System\Module\Settings
{
protected function initDefaults()
{
$this->aContainer = [
"Disabled" => new SettingsProperty(
false,
"bool",
null,
"Setting to true disables the module",
),
"PublicKey" => new SettingsProperty(
"",
"string",
null,
"Public key obtained at reCAPTCHA website",
),
"PrivateKey" => new SettingsProperty(
"",
"string",
null,
"Private key obtained at reCAPTCHA website",
),
"LimitCount" => new SettingsProperty(
0,
"int",
null,
"Denotes number of unsuccessful login attempts required for CAPTCHA to be displayed, 0 - always displayed",
),
"WhitelistIPs" => new SettingsProperty(
[],
"array",
null,
"List of IP addresses CAPTCHA is never be displayed for",
),
"IncludeInMobile" => new SettingsProperty(
true,
"bool",
null,
"If true, the module is used in mobile version of the interface",
),
"IncludeInDesktop" => new SettingsProperty(
true,
"bool",
null,
"If true, the module is used in desktop version of the interface",
),
"RequestMethod" => new SettingsProperty(
Enums\RequestMethods::SocketPost,
"spec",
Enums\RequestMethods::class,
"Request method used by API",
),
];
}
}