1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-08 12:58:31 +01:00
phorge-phorge/src/applications/auth/provider/PhabricatorTwitchAuthProvider.php
Joshua Spence 701bb2ac6e Rename auth classes for consistency
Summary: Ref T5655. Depends on D9998.

Test Plan: `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: 20after4, epriestley, Korvin

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D9999
2014-07-22 21:04:13 +10:00

36 lines
970 B
PHP

<?php
final class PhabricatorTwitchAuthProvider
extends PhabricatorOAuth2AuthProvider {
public function getProviderName() {
return pht('Twitch.tv');
}
protected function getProviderConfigurationHelp() {
$login_uri = PhabricatorEnv::getURI($this->getLoginURI());
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 PhutilTwitchAuthAdapter();
}
protected function getLoginIcon() {
return 'TwitchTV';
}
}