mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 03:12:41 +01:00
1834584e98
Summary: Ref T1536. - Move all the provider-specific help into contextual help in Auth. - This provides help much more contextually, and we can just tell the user the right values to use to configure things. - Rewrite account/registration help to reflect the newer state of the word. - Also clean up a few other loose ends. Test Plan: {F46937} Reviewers: chad, btrahan Reviewed By: chad CC: aran Maniphest Tasks: T1536 Differential Revision: https://secure.phabricator.com/D6247
39 lines
1 KiB
PHP
39 lines
1 KiB
PHP
<?php
|
|
|
|
final class PhabricatorAuthProviderOAuthGitHub
|
|
extends PhabricatorAuthProviderOAuth {
|
|
|
|
public function getProviderName() {
|
|
return pht('GitHub');
|
|
}
|
|
|
|
public function getConfigurationHelp() {
|
|
$uri = PhabricatorEnv::getProductionURI('/');
|
|
$callback_uri = $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 PhutilAuthAdapterOAuthGitHub();
|
|
}
|
|
|
|
protected function getLoginIcon() {
|
|
return 'Github';
|
|
}
|
|
|
|
}
|