[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorAsanaAuthProvider extends PhabricatorOAuth2AuthProvider { 4 5 public function getProviderName() { 6 return pht('Asana'); 7 } 8 9 protected function getProviderConfigurationHelp() { 10 $app_uri = PhabricatorEnv::getProductionURI('/'); 11 $login_uri = PhabricatorEnv::getURI($this->getLoginURI()); 12 13 return pht( 14 "To configure Asana OAuth, create a new application here:". 15 "\n\n". 16 "https://app.asana.com/-/account_api". 17 "\n\n". 18 "When creating your application, use these settings:". 19 "\n\n". 20 " - **App URL:** Set this to: `%s`\n". 21 " - **Redirect URL:** Set this to: `%s`". 22 "\n\n". 23 "After completing configuration, copy the **Client ID** and ". 24 "**Client Secret** to the fields above.", 25 $app_uri, 26 $login_uri); 27 } 28 29 protected function newOAuthAdapter() { 30 return new PhutilAsanaAuthAdapter(); 31 } 32 33 protected function getLoginIcon() { 34 return 'Asana'; 35 } 36 37 public static function getAsanaProvider() { 38 $providers = self::getAllEnabledProviders(); 39 40 foreach ($providers as $provider) { 41 if ($provider instanceof PhabricatorAsanaAuthProvider) { 42 return $provider; 43 } 44 } 45 46 return null; 47 } 48 49 }
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 |