Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18921277
PhabricatorGitHubAuthProvider.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorGitHubAuthProvider.php
View Options
<?php
final
class
PhabricatorGitHubAuthProvider
extends
PhabricatorOAuth2AuthProvider
{
public
function
getProviderName
()
{
return
pht
(
'GitHub'
);
}
protected
function
getProviderConfigurationHelp
()
{
$uri
=
PhabricatorEnv
::
getProductionURI
(
'/'
);
$callback_uri
=
PhabricatorEnv
::
getURI
(
$this
->
getLoginURI
());
return
pht
(
"To configure GitHub OAuth, create a new GitHub Application here:"
.
"
\n\n
"
.
"https://github.com/settings/applications/new"
.
"
\n\n
"
.
"You should use these settings in your application:"
.
"
\n\n
"
.
" - **URL:** Set this to your full domain with protocol. For this "
.
" Phabricator install, the correct value is: `%s`
\n
"
.
" - **Callback URL**: Set this to: `%s`
\n
"
.
"
\n\n
"
.
"Once you've created an application, copy the **Client ID** and "
.
"**Client Secret** into the fields above."
,
$uri
,
$callback_uri
);
}
protected
function
newOAuthAdapter
()
{
return
new
PhutilGitHubAuthAdapter
();
}
protected
function
getLoginIcon
()
{
return
'Github'
;
}
public
function
getLoginURI
()
{
// TODO: Clean this up. See PhabricatorAuthOldOAuthRedirectController.
return
'/oauth/github/login/'
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Nov 11, 1:56 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8229140
Default Alt Text
PhabricatorGitHubAuthProvider.php (1 KB)
Attached To
Mode
rP Phabricator
Attached
Detach File
Event Timeline
Log In to Comment