mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-09 06:11:01 +01:00
701bb2ac6e
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
35 lines
871 B
PHP
35 lines
871 B
PHP
<?php
|
|
|
|
final class PhabricatorTwitterAuthProvider
|
|
extends PhabricatorOAuth1AuthProvider {
|
|
|
|
public function getProviderName() {
|
|
return pht('Twitter');
|
|
}
|
|
|
|
protected function getProviderConfigurationHelp() {
|
|
$login_uri = PhabricatorEnv::getURI($this->getLoginURI());
|
|
|
|
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() {
|
|
return new PhutilTwitterAuthAdapter();
|
|
}
|
|
|
|
protected function getLoginIcon() {
|
|
return 'Twitter';
|
|
}
|
|
|
|
}
|