mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
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
This commit is contained in:
parent
8b1fb16865
commit
65fbbd06c6
2 changed files with 55 additions and 0 deletions
|
@ -1053,6 +1053,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPeopleLogsController' => 'applications/people/controller/PhabricatorPeopleLogsController.php',
|
||||
'PhabricatorPeopleProfileController' => 'applications/people/controller/PhabricatorPeopleProfileController.php',
|
||||
'PhabricatorPeopleQuery' => 'applications/people/PhabricatorPeopleQuery.php',
|
||||
'PhabricatorPhabricatorOAuthConfigOptions' => 'applications/config/option/PhabricatorPhabricatorOAuthConfigOptions.php',
|
||||
'PhabricatorPhameConfigOptions' => 'applications/phame/config/PhabricatorPhameConfigOptions.php',
|
||||
'PhabricatorPhrictionConfigOptions' => 'applications/phriction/config/PhabricatorPhrictionConfigOptions.php',
|
||||
'PhabricatorPinboardItemView' => 'view/layout/PhabricatorPinboardItemView.php',
|
||||
|
@ -2407,6 +2408,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPeopleLogsController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleProfileController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleQuery' => 'PhabricatorOffsetPagedQuery',
|
||||
'PhabricatorPhabricatorOAuthConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||
'PhabricatorPhameConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||
'PhabricatorPhrictionConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||
'PhabricatorPinboardItemView' => 'AphrontView',
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
<?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.")),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue