3 final class PhabricatorAuthApplication
extends PhabricatorApplication
{
5 public function canUninstall() {
9 public function getBaseURI() {
13 public function getIcon() {
17 public function isPinnedByDefault(PhabricatorUser
$viewer) {
18 return $viewer->getIsAdmin();
21 public function getName() {
25 public function getShortDescription() {
26 return pht('Login/Registration');
29 public function getHelpDocumentationArticles(PhabricatorUser
$viewer) {
30 // NOTE: Although reasonable help exists for this in "Configuring Accounts
31 // and Registration", specifying help items here means we get the menu
32 // item in all the login/link interfaces, which is confusing and not
35 // TODO: Special case this, or split the auth and auth administration
41 public function getApplicationGroup() {
42 return self
::GROUP_ADMIN
;
45 public function getRoutes() {
48 '' => 'PhabricatorAuthListController',
50 'new/' => 'PhabricatorAuthNewController',
51 'edit/(?:(?P<id>\d+)/)?' => 'PhabricatorAuthEditController',
52 '(?P<action>enable|disable)/(?P<id>\d+)/'
53 => 'PhabricatorAuthDisableController',
54 'view/(?P<id>\d+)/' => 'PhabricatorAuthProviderViewController',
56 'login/(?P<pkey>[^/]+)/(?:(?P<extra>[^/]+)/)?'
57 => 'PhabricatorAuthLoginController',
58 '(?P<loggedout>loggedout)/' => 'PhabricatorAuthStartController',
59 'invite/(?P<code>[^/]+)/' => 'PhabricatorAuthInviteController',
60 'register/(?:(?P<akey>[^/]+)/)?' => 'PhabricatorAuthRegisterController',
61 'start/' => 'PhabricatorAuthStartController',
62 'validate/' => 'PhabricatorAuthValidateController',
63 'finish/' => 'PhabricatorAuthFinishController',
64 'unlink/(?P<id>\d+)/' => 'PhabricatorAuthUnlinkController',
65 '(?P<action>link|refresh)/(?P<id>\d+)/'
66 => 'PhabricatorAuthLinkController',
67 'confirmlink/(?P<akey>[^/]+)/'
68 => 'PhabricatorAuthConfirmLinkController',
69 'session/terminate/(?P<id>[^/]+)/'
70 => 'PhabricatorAuthTerminateSessionController',
71 'token/revoke/(?P<id>[^/]+)/'
72 => 'PhabricatorAuthRevokeTokenController',
74 => 'PhabricatorAuthDowngradeSessionController',
76 '(?:(?P<pageKey>[^/]+)/)?'
77 => 'PhabricatorAuthNeedsMultiFactorController',
80 $this->getQueryRoutePattern('for/(?P<forPHID>[^/]+)/')
81 => 'PhabricatorAuthSSHKeyListController',
82 'generate/' => 'PhabricatorAuthSSHKeyGenerateController',
83 'upload/' => 'PhabricatorAuthSSHKeyEditController',
84 'edit/(?P<id>\d+)/' => 'PhabricatorAuthSSHKeyEditController',
86 => 'PhabricatorAuthSSHKeyRevokeController',
87 'view/(?P<id>\d+)/' => 'PhabricatorAuthSSHKeyViewController',
90 'password/' => 'PhabricatorAuthSetPasswordController',
91 'external/' => 'PhabricatorAuthSetExternalController',
94 $this->getQueryRoutePattern() =>
95 'PhabricatorAuthFactorProviderListController',
96 $this->getEditRoutePattern('edit/') =>
97 'PhabricatorAuthFactorProviderEditController',
98 '(?P<id>[1-9]\d*)/' =>
99 'PhabricatorAuthFactorProviderViewController',
100 'message/(?P<id>[1-9]\d*)/' =>
101 'PhabricatorAuthFactorProviderMessageController',
102 'challenge/status/(?P<id>[1-9]\d*)/' =>
103 'PhabricatorAuthChallengeStatusController',
107 $this->getQueryRoutePattern() =>
108 'PhabricatorAuthMessageListController',
109 $this->getEditRoutePattern('edit/') =>
110 'PhabricatorAuthMessageEditController',
112 'PhabricatorAuthMessageViewController',
116 $this->getEditRoutePattern('edit/') =>
117 'PhabricatorAuthContactNumberEditController',
118 '(?P<id>[1-9]\d*)/' =>
119 'PhabricatorAuthContactNumberViewController',
120 '(?P<action>disable|enable)/(?P<id>[1-9]\d*)/' =>
121 'PhabricatorAuthContactNumberDisableController',
122 'primary/(?P<id>[1-9]\d*)/' =>
123 'PhabricatorAuthContactNumberPrimaryController',
124 'test/(?P<id>[1-9]\d*)/' =>
125 'PhabricatorAuthContactNumberTestController',
129 '/oauth/(?P<provider>\w+)/login/'
130 => 'PhabricatorAuthOldOAuthRedirectController',
133 '' => 'PhabricatorAuthStartController',
134 'email/' => 'PhabricatorEmailLoginController',
139 '(?:(?P<emailID>\d+)/)?' => 'PhabricatorAuthOneTimeLoginController',
140 'refresh/' => 'PhabricatorRefreshCSRFController',
141 'mustverify/' => 'PhabricatorMustVerifyEmailController',
144 '/emailverify/(?P<code>[^/]+)/'
145 => 'PhabricatorEmailVerificationController',
147 '/logout/' => 'PhabricatorLogoutController',
151 protected function getCustomCapabilities() {
153 AuthManageProvidersCapability
::CAPABILITY
=> array(
154 'default' => PhabricatorPolicies
::POLICY_ADMIN
,