2013-09-03 05:53:08 -07:00
|
|
|
<?php
|
|
|
|
|
2014-07-22 21:04:13 +10:00
|
|
|
final class PhabricatorTwitterAuthProvider
|
|
|
|
extends PhabricatorOAuth1AuthProvider {
|
2013-09-03 05:53:08 -07:00
|
|
|
|
|
|
|
public function getProviderName() {
|
|
|
|
return pht('Twitter');
|
|
|
|
}
|
|
|
|
|
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-09-03 05:53:08 -07:00
|
|
|
|
|
|
|
return pht(
|
|
|
|
"To configure Twitter OAuth, create a new application here:".
|
|
|
|
"\n\n".
|
|
|
|
"https://dev.twitter.com/apps".
|
|
|
|
"\n\n".
|
|
|
|
"When creating your application, use these settings:".
|
|
|
|
"\n\n".
|
|
|
|
" - **Callback URL:** Set this to: `%s`".
|
|
|
|
"\n\n".
|
|
|
|
"After completing configuration, copy the **Consumer Key** and ".
|
|
|
|
"**Consumer Secret** to the fields above.",
|
|
|
|
$login_uri);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function newOAuthAdapter() {
|
2014-07-22 21:04:13 +10:00
|
|
|
return new PhutilTwitterAuthAdapter();
|
2013-09-03 05:53:08 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
protected function getLoginIcon() {
|
|
|
|
return 'Twitter';
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|