[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/auth/provider/ -> PhabricatorWordPressAuthProvider.php (source)

   1  <?php
   2  
   3  final class PhabricatorWordPressAuthProvider
   4    extends PhabricatorOAuth2AuthProvider {
   5  
   6    public function getProviderName() {
   7      return pht('WordPress.com');
   8    }
   9  
  10    protected function getProviderConfigurationHelp() {
  11      $uri = PhabricatorEnv::getProductionURI('/');
  12      $callback_uri = PhabricatorEnv::getURI($this->getLoginURI());
  13  
  14      return pht(
  15        "To configure WordPress.com OAuth, create a new WordPress.com ".
  16        "Application here:\n\n".
  17        "https://developer.wordpress.com/apps/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        "  - **Redirect 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 PhutilWordPressAuthAdapter();
  33    }
  34  
  35    protected function getLoginIcon() {
  36      return 'WordPressCOM';
  37    }
  38  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1