[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorGitHubAuthProvider 4 extends PhabricatorOAuth2AuthProvider { 5 6 public function getProviderName() { 7 return pht('GitHub'); 8 } 9 10 protected function getProviderConfigurationHelp() { 11 $uri = PhabricatorEnv::getProductionURI('/'); 12 $callback_uri = PhabricatorEnv::getURI($this->getLoginURI()); 13 14 return pht( 15 "To configure GitHub OAuth, create a new GitHub Application here:". 16 "\n\n". 17 "https://github.com/settings/applications/new". 18 "\n\n". 19 "You should use these settings in your application:". 20 "\n\n". 21 " - **URL:** Set this to your full domain with protocol. For this ". 22 " Phabricator install, the correct value is: `%s`\n". 23 " - **Callback URL**: Set this to: `%s`\n". 24 "\n\n". 25 "Once you've created an application, copy the **Client ID** and ". 26 "**Client Secret** into the fields above.", 27 $uri, 28 $callback_uri); 29 } 30 31 protected function newOAuthAdapter() { 32 return new PhutilGitHubAuthAdapter(); 33 } 34 35 protected function getLoginIcon() { 36 return 'Github'; 37 } 38 39 public function getLoginURI() { 40 // TODO: Clean this up. See PhabricatorAuthOldOAuthRedirectController. 41 return '/oauth/github/login/'; 42 } 43 44 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |