mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 09:42:41 +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
38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
|
|
final class PhabricatorWordPressAuthProvider
|
|
extends PhabricatorOAuth2AuthProvider {
|
|
|
|
public function getProviderName() {
|
|
return pht('WordPress.com');
|
|
}
|
|
|
|
protected function getProviderConfigurationHelp() {
|
|
$uri = PhabricatorEnv::getProductionURI('/');
|
|
$callback_uri = PhabricatorEnv::getURI($this->getLoginURI());
|
|
|
|
return pht(
|
|
"To configure WordPress.com OAuth, create a new WordPress.com ".
|
|
"Application here:\n\n".
|
|
"https://developer.wordpress.com/apps/new/.".
|
|
"\n\n".
|
|
"You should use these settings in your application:".
|
|
"\n\n".
|
|
" - **URL:** Set this to your full domain with protocol. For this ".
|
|
" Phabricator install, the correct value is: `%s`\n".
|
|
" - **Redirect URL**: Set this to: `%s`\n".
|
|
"\n\n".
|
|
"Once you've created an application, copy the **Client ID** and ".
|
|
"**Client Secret** into the fields above.",
|
|
$uri,
|
|
$callback_uri);
|
|
}
|
|
|
|
protected function newOAuthAdapter() {
|
|
return new PhutilWordPressAuthAdapter();
|
|
}
|
|
|
|
protected function getLoginIcon() {
|
|
return 'WordPressCOM';
|
|
}
|
|
}
|