2013-06-16 19:16:14 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorAuthProviderOAuthDisqus
|
2014-04-09 20:09:50 +02:00
|
|
|
extends PhabricatorAuthProviderOAuth2 {
|
2013-06-16 19:16:14 +02:00
|
|
|
|
|
|
|
public function getProviderName() {
|
|
|
|
return pht('Disqus');
|
|
|
|
}
|
|
|
|
|
2014-04-09 20:09:50 +02:00
|
|
|
protected function getProviderConfigurationHelp() {
|
2014-01-23 23:03:44 +01:00
|
|
|
$login_uri = PhabricatorEnv::getURI($this->getLoginURI());
|
2013-06-20 20:18:48 +02:00
|
|
|
|
|
|
|
return pht(
|
|
|
|
"To configure Disqus OAuth, create a new application here:".
|
|
|
|
"\n\n".
|
|
|
|
"http://disqus.com/api/applications/".
|
|
|
|
"\n\n".
|
|
|
|
"Create an application, then adjust these settings:".
|
|
|
|
"\n\n".
|
|
|
|
" - **Callback URL:** Set this to `%s`".
|
|
|
|
"\n\n".
|
|
|
|
"After creating an application, copy the **Public Key** and ".
|
|
|
|
"**Secret Key** to the fields above (the **Public Key** goes in ".
|
|
|
|
"**OAuth App ID**).",
|
|
|
|
$login_uri);
|
|
|
|
}
|
|
|
|
|
2013-06-16 19:16:14 +02:00
|
|
|
protected function newOAuthAdapter() {
|
|
|
|
return new PhutilAuthAdapterOAuthDisqus();
|
|
|
|
}
|
|
|
|
|
2013-06-17 01:31:57 +02:00
|
|
|
protected function getLoginIcon() {
|
|
|
|
return 'Disqus';
|
|
|
|
}
|
|
|
|
|
2013-06-16 19:16:14 +02:00
|
|
|
}
|