Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/config/option/PhabricatorRecaptchaConfigOptions.php
12256 views
1
<?php
2
3
final class PhabricatorRecaptchaConfigOptions
4
extends PhabricatorApplicationConfigOptions {
5
6
public function getName() {
7
return pht('Integration with Recaptcha');
8
}
9
10
public function getDescription() {
11
return pht('Configure Recaptcha captchas.');
12
}
13
14
public function getIcon() {
15
return 'fa-recycle';
16
}
17
18
public function getGroup() {
19
return 'core';
20
}
21
22
public function getOptions() {
23
24
return array(
25
$this->newOption('recaptcha.enabled', 'bool', false)
26
->setLocked(true)
27
->setBoolOptions(
28
array(
29
pht('Enable Recaptcha'),
30
pht('Disable Recaptcha'),
31
))
32
->setSummary(pht('Enable captchas with Recaptcha.'))
33
->setDescription(
34
pht(
35
'Enable recaptcha to require users solve captchas after a few '.
36
'failed login attempts. This hinders brute-force attacks against '.
37
'user passwords. For more information, see http://recaptcha.net/')),
38
$this->newOption('recaptcha.public-key', 'string', null)
39
->setLocked(true)
40
->setDescription(
41
pht('Recaptcha public key, obtained by signing up for Recaptcha.')),
42
$this->newOption('recaptcha.private-key', 'string', null)
43
->setHidden(true)
44
->setDescription(
45
pht('Recaptcha private key, obtained by signing up for Recaptcha.')),
46
);
47
}
48
49
}
50
51