2013-01-01 23:09:29 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorFacebookConfigOptions
|
|
|
|
extends PhabricatorApplicationConfigOptions {
|
|
|
|
|
|
|
|
public function getName() {
|
|
|
|
return pht("Integration with Facebook");
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescription() {
|
|
|
|
return pht("Facebook authentication and integration options.");
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getOptions() {
|
|
|
|
return array(
|
|
|
|
$this->newOption('facebook.auth-enabled', 'bool', false)
|
|
|
|
->setOptions(
|
|
|
|
array(
|
|
|
|
pht("Enable Facebook Authentication"),
|
2013-01-07 22:50:03 +01:00
|
|
|
pht("Disable Facebook Authentication"),
|
2013-01-01 23:09:29 +01:00
|
|
|
))
|
|
|
|
->setDescription(
|
|
|
|
pht(
|
|
|
|
'Allow users to login to Phabricator using Facebook credentials.')),
|
|
|
|
$this->newOption('facebook.registration-enabled', 'bool', true)
|
|
|
|
->setOptions(
|
|
|
|
array(
|
|
|
|
pht("Enable Facebook Registration"),
|
2013-01-07 22:50:03 +01:00
|
|
|
pht("Disable Facebook Registration"),
|
2013-01-01 23:09:29 +01:00
|
|
|
))
|
|
|
|
->setDescription(
|
|
|
|
pht(
|
|
|
|
'Allow users to create new Phabricator accounts using Facebook '.
|
|
|
|
'credentials.')),
|
|
|
|
$this->newOption('facebook.auth-permanent', 'bool', false)
|
|
|
|
->setOptions(
|
|
|
|
array(
|
|
|
|
pht("Permanently Bind Facebook Accounts"),
|
2013-01-07 22:50:03 +01:00
|
|
|
pht("Allow Facebook Account Unlinking"),
|
2013-01-01 23:09:29 +01:00
|
|
|
))
|
|
|
|
->setDescription(
|
|
|
|
pht(
|
|
|
|
'Are Phabricator accounts permanently bound to Facebook '.
|
|
|
|
'accounts?')),
|
|
|
|
$this->newOption('facebook.application-id', 'string', null)
|
|
|
|
->setDescription(
|
|
|
|
pht(
|
|
|
|
'Facebook "Application ID" to use for Facebook API access.')),
|
|
|
|
$this->newOption('facebook.application-secret', 'string', null)
|
|
|
|
->setDescription(
|
|
|
|
pht(
|
|
|
|
'Facebook "Application Secret" to use for Facebook API access.')),
|
|
|
|
$this->newOption('facebook.require-https-auth', 'bool', false)
|
|
|
|
->setOptions(
|
|
|
|
array(
|
|
|
|
pht("Require HTTPS"),
|
2013-01-07 22:50:03 +01:00
|
|
|
pht("Do Not Require HTTPS"),
|
2013-01-01 23:09:29 +01:00
|
|
|
))
|
|
|
|
->setSummary(
|
|
|
|
pht(
|
|
|
|
'Reject Facebook logins from accounts that do not have Facebook '.
|
|
|
|
'configured in HTTPS-only mode.'))
|
|
|
|
->setDescription(
|
|
|
|
pht(
|
|
|
|
'You can require users logging in via Facebook auth have Facebook '.
|
|
|
|
'set to HTTPS-only, which ensures their Facebook cookies are '.
|
|
|
|
'SSL-only. This makes it more difficult for an attacker to '.
|
|
|
|
'escalate a cookie-sniffing attack which captures Facebook '.
|
|
|
|
'credentials into Phabricator access, but will require users '.
|
|
|
|
'change their Facebook settings if they do not have this mode '.
|
|
|
|
'enabled.')),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|