[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

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

   1  <?php
   2  
   3  final class PhabricatorTwitchAuthProvider
   4    extends PhabricatorOAuth2AuthProvider {
   5  
   6    public function getProviderName() {
   7      return pht('Twitch.tv');
   8    }
   9  
  10    protected function getProviderConfigurationHelp() {
  11      $login_uri = PhabricatorEnv::getURI($this->getLoginURI());
  12  
  13      return pht(
  14        "To configure Twitch.tv OAuth, create a new application here:".
  15        "\n\n".
  16        "http://www.twitch.tv/settings/applications".
  17        "\n\n".
  18        "When creating your application, use these settings:".
  19        "\n\n".
  20        "  - **Redirect URI:** Set this to: `%s`".
  21        "\n\n".
  22        "After completing configuration, copy the **Client ID** and ".
  23        "**Client Secret** to the fields above. (You may need to generate the ".
  24        "client secret by clicking 'New Secret' first.)",
  25        $login_uri);
  26    }
  27  
  28    protected function newOAuthAdapter() {
  29      return new PhutilTwitchAuthAdapter();
  30    }
  31  
  32    protected function getLoginIcon() {
  33      return 'TwitchTV';
  34    }
  35  
  36  }


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