1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 16:30:59 +01:00
phorge-phorge/src/applications/config/option/PhabricatorPhabricatorOAuthConfigOptions.php
Ricky Elrod 65fbbd06c6 OAuth options.
Test Plan: Looked at the options.

Reviewers: epriestley, btrahan, chad

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2255

Differential Revision: https://secure.phabricator.com/D4470
2013-01-16 10:00:54 -08:00

53 lines
1.8 KiB
PHP

<?php
final class PhabricatorPhabricatorOAuthConfigOptions
extends PhabricatorApplicationConfigOptions {
public function getName() {
return pht("Phabricator OAuth");
}
public function getDescription() {
return pht("Configure Phabricator's OAuth provider.");
}
public function getOptions() {
return array(
$this->newOption('phabricator.oauth-uri', 'string', null)
->setDescription(
pht(
"The URI of the Phabricator instance to use as an OAuth server."))
->addExample('https://phabricator.example.com/', pht('Valid Setting')),
$this->newOption('phabricator.auth-enabled', 'bool', false)
->setDescription(
pht(
"Can users use Phabricator credentials to login to Phabricator?")),
$this->newOption('phabricator.registration-enabled', 'bool', true)
->setDescription(
pht(
"Can users use Phabricator credentials to create new Phabricator ".
"accounts?")),
$this->newOption('phabricator.auth-permanent', 'bool', false)
->setBoolOptions(
array(
pht("Permanent"),
pht("Able to be unlinked"),
))
->setDescription(
pht(
"Are Phabricator accounts permanently linked to Phabricator ".
"accounts, or can the user unlink them?")),
$this->newOption('phabricator.application-id', 'string', null)
->setDescription(
pht(
"The Phabricator 'Client ID' to use for Phabricator API access.")),
$this->newOption('phabricator.application-secret', 'string', null)
->setMasked(true)
->setDescription(
pht(
"The Phabricator 'Client Secret' to use for Phabricator API ".
"access.")),
);
}
}