mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-24 15:52:41 +01:00
2d43cf1296
Summary: Fixes T4755. This also includes putting in a note that Google might ToS you to use the Google+ API. Lots of code here as there was some repeated stuff between OAuth1 and OAuth2 so I made a base OAuth with less-base OAuth1 and OAuth2 inheriting from it. The JIRA provider remains an independent mess and didn't get the notes field thing. Test Plan: looked at providers and read pretty instructions. Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T4755 Differential Revision: https://secure.phabricator.com/D8726
36 lines
929 B
PHP
36 lines
929 B
PHP
<?php
|
|
|
|
final class PhabricatorAuthProviderOAuthDisqus
|
|
extends PhabricatorAuthProviderOAuth2 {
|
|
|
|
public function getProviderName() {
|
|
return pht('Disqus');
|
|
}
|
|
|
|
protected function getProviderConfigurationHelp() {
|
|
$login_uri = PhabricatorEnv::getURI($this->getLoginURI());
|
|
|
|
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);
|
|
}
|
|
|
|
protected function newOAuthAdapter() {
|
|
return new PhutilAuthAdapterOAuthDisqus();
|
|
}
|
|
|
|
protected function getLoginIcon() {
|
|
return 'Disqus';
|
|
}
|
|
|
|
}
|