2013-01-03 18:17:38 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorRecaptchaConfigOptions
|
|
|
|
extends PhabricatorApplicationConfigOptions {
|
|
|
|
|
|
|
|
public function getName() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Integration with Recaptcha');
|
2013-01-03 18:17:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescription() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Configure Recaptcha captchas.');
|
2013-01-03 18:17:38 +01:00
|
|
|
}
|
|
|
|
|
2015-02-02 19:17:25 +01:00
|
|
|
public function getFontIcon() {
|
|
|
|
return 'fa-recycle';
|
|
|
|
}
|
|
|
|
|
2015-02-09 22:10:56 +01:00
|
|
|
public function getGroup() {
|
|
|
|
return 'core';
|
|
|
|
}
|
|
|
|
|
2013-01-03 18:17:38 +01:00
|
|
|
public function getOptions() {
|
|
|
|
|
|
|
|
return array(
|
|
|
|
$this->newOption('recaptcha.enabled', 'bool', false)
|
2013-01-09 17:14:26 +01:00
|
|
|
->setBoolOptions(
|
2013-01-03 18:17:38 +01:00
|
|
|
array(
|
2014-06-09 20:36:49 +02:00
|
|
|
pht('Enable Recaptcha'),
|
|
|
|
pht('Disable Recaptcha'),
|
2013-01-03 18:17:38 +01:00
|
|
|
))
|
|
|
|
->setSummary(pht('Enable captchas with Recaptcha.'))
|
|
|
|
->setDescription(
|
|
|
|
pht(
|
2014-06-09 20:36:49 +02:00
|
|
|
'Enable recaptcha to require users solve captchas after a few '.
|
|
|
|
'failed login attempts. This hinders brute-force attacks against '.
|
|
|
|
'user passwords. For more information, see http://recaptcha.net/')),
|
2013-01-03 18:17:38 +01:00
|
|
|
$this->newOption('recaptcha.public-key', 'string', null)
|
|
|
|
->setDescription(
|
|
|
|
pht('Recaptcha public key, obtained by signing up for Recaptcha.')),
|
|
|
|
$this->newOption('recaptcha.private-key', 'string', null)
|
|
|
|
->setMasked(true)
|
|
|
|
->setDescription(
|
|
|
|
pht('Recaptcha private key, obtained by signing up for Recaptcha.')),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|