Path: blob/master/src/applications/auth/provider/PhabricatorGitHubAuthProvider.php
12256 views
<?php12final class PhabricatorGitHubAuthProvider3extends PhabricatorOAuth2AuthProvider {45public function getProviderName() {6return pht('GitHub');7}89protected function getProviderConfigurationHelp() {10$uri = PhabricatorEnv::getProductionURI('/');11$callback_uri = PhabricatorEnv::getURI($this->getLoginURI());1213return pht(14"To configure GitHub OAuth, create a new GitHub Application here:".15"\n\n".16"https://github.com/settings/applications/new".17"\n\n".18"You should use these settings in your application:".19"\n\n".20" - **URL:** Set this to your full domain with protocol. For this ".21" server, the correct value is: `%s`\n".22" - **Callback URL**: Set this to: `%s`\n".23"\n\n".24"Once you've created an application, copy the **Client ID** and ".25"**Client Secret** into the fields above.",26$uri,27$callback_uri);28}2930protected function newOAuthAdapter() {31return new PhutilGitHubAuthAdapter();32}3334protected function getLoginIcon() {35return 'Github';36}3738public function getLoginURI() {39// TODO: Clean this up. See PhabricatorAuthOldOAuthRedirectController.40return '/oauth/github/login/';41}4243}444546