Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/oauthserver/application/PhabricatorOAuthServerApplication.php
12242 views
1
<?php
2
3
final class PhabricatorOAuthServerApplication extends PhabricatorApplication {
4
5
public function getName() {
6
return pht('OAuth Server');
7
}
8
9
public function getBaseURI() {
10
return '/oauthserver/';
11
}
12
13
public function getShortDescription() {
14
return pht('OAuth Login Provider');
15
}
16
17
public function getIcon() {
18
return 'fa-hotel';
19
}
20
21
public function getTitleGlyph() {
22
return "\xE2\x99\x86";
23
}
24
25
public function getFlavorText() {
26
return pht(
27
'Log In with %s',
28
PlatformSymbols::getPlatformServerName());
29
}
30
31
public function getApplicationGroup() {
32
return self::GROUP_ADMIN;
33
}
34
35
public function isPrototype() {
36
return true;
37
}
38
39
public function getHelpDocumentationArticles(PhabricatorUser $viewer) {
40
return array(
41
array(
42
'name' => pht('Using the Phabricator OAuth Server'),
43
'href' => PhabricatorEnv::getDoclink(
44
'Using the Phabricator OAuth Server'),
45
),
46
);
47
}
48
49
public function getRoutes() {
50
return array(
51
'/oauthserver/' => array(
52
'(?:query/(?P<queryKey>[^/]+)/)?'
53
=> 'PhabricatorOAuthClientListController',
54
'auth/' => 'PhabricatorOAuthServerAuthController',
55
'token/' => 'PhabricatorOAuthServerTokenController',
56
$this->getEditRoutePattern('edit/') =>
57
'PhabricatorOAuthClientEditController',
58
'client/' => array(
59
'disable/(?P<id>\d+)/' => 'PhabricatorOAuthClientDisableController',
60
'view/(?P<id>\d+)/' => 'PhabricatorOAuthClientViewController',
61
'secret/(?P<id>\d+)/' => 'PhabricatorOAuthClientSecretController',
62
'test/(?P<id>\d+)/' => 'PhabricatorOAuthClientTestController',
63
),
64
),
65
);
66
}
67
68
protected function getCustomCapabilities() {
69
return array(
70
PhabricatorOAuthServerCreateClientsCapability::CAPABILITY => array(
71
'default' => PhabricatorPolicies::POLICY_ADMIN,
72
),
73
);
74
}
75
76
}
77
78