2013-08-08 13:34:30 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorAuthProviderOAuthTwitch
|
2014-04-09 11:09:50 -07:00
|
|
|
extends PhabricatorAuthProviderOAuth2 {
|
2013-08-08 13:34:30 -07:00
|
|
|
|
|
|
|
public function getProviderName() {
|
|
|
|
return pht('Twitch.tv');
|
|
|
|
}
|
|
|
|
|
2014-04-09 11:09:50 -07:00
|
|
|
protected function getProviderConfigurationHelp() {
|
2014-01-23 14:03:44 -08:00
|
|
|
$login_uri = PhabricatorEnv::getURI($this->getLoginURI());
|
2013-08-08 13:34:30 -07:00
|
|
|
|
|
|
|
return pht(
|
|
|
|
"To configure Twitch.tv OAuth, create a new application here:".
|
|
|
|
"\n\n".
|
|
|
|
"http://www.twitch.tv/settings/applications".
|
|
|
|
"\n\n".
|
|
|
|
"When creating your application, use these settings:".
|
|
|
|
"\n\n".
|
|
|
|
" - **Redirect URI:** Set this to: `%s`".
|
|
|
|
"\n\n".
|
|
|
|
"After completing configuration, copy the **Client ID** and ".
|
|
|
|
"**Client Secret** to the fields above. (You may need to generate the ".
|
|
|
|
"client secret by clicking 'New Secret' first.)",
|
|
|
|
$login_uri);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function newOAuthAdapter() {
|
|
|
|
return new PhutilAuthAdapterOAuthTwitch();
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function getLoginIcon() {
|
2013-08-12 11:41:03 -07:00
|
|
|
return 'TwitchTV';
|
2013-08-08 13:34:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|