Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15394175
D9019.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
7 KB
Referenced Files
None
Subscribers
None
D9019.diff
View Options
diff --git a/resources/sprite/login_1x/WordPressCOM.png b/resources/sprite/login_1x/WordPressCOM.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/sprite/login_2x/WordPressCOM.png b/resources/sprite/login_2x/WordPressCOM.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/sprite/manifest/login.json b/resources/sprite/manifest/login.json
--- a/resources/sprite/manifest/login.json
+++ b/resources/sprite/manifest/login.json
@@ -1,92 +1,97 @@
{
"version" : 1,
"sprites" : {
- "login-Amazon" : {
+ "login-Amazon" : {
"name" : "login-Amazon",
"rule" : ".login-Amazon",
"hash" : "5961e41c525ef46c88558616fcf23272"
},
- "login-Asana" : {
+ "login-Asana" : {
"name" : "login-Asana",
"rule" : ".login-Asana",
"hash" : "30df492eab339fa64c9ae9b21bb46a18"
},
- "login-Disqus" : {
+ "login-Disqus" : {
"name" : "login-Disqus",
"rule" : ".login-Disqus",
"hash" : "5f46ac50a5d9d13245971c298f49e13b"
},
- "login-Dropbox" : {
+ "login-Dropbox" : {
"name" : "login-Dropbox",
"rule" : ".login-Dropbox",
"hash" : "572ab36301762414365b68c0bc185ac5"
},
- "login-Facebook" : {
+ "login-Facebook" : {
"name" : "login-Facebook",
"rule" : ".login-Facebook",
"hash" : "2b1511f5b4d12076dd9086d1bb187b28"
},
- "login-Generic" : {
+ "login-Generic" : {
"name" : "login-Generic",
"rule" : ".login-Generic",
"hash" : "60d75c38668ffd6eea91a40e66186601"
},
- "login-Github" : {
+ "login-Github" : {
"name" : "login-Github",
"rule" : ".login-Github",
"hash" : "633696beb8c1eaac642ce4955be917d8"
},
- "login-Google" : {
+ "login-Google" : {
"name" : "login-Google",
"rule" : ".login-Google",
"hash" : "b7d3962a31df1e6c13e0a3c97c08f11d"
},
- "login-HTTP" : {
+ "login-HTTP" : {
"name" : "login-HTTP",
"rule" : ".login-HTTP",
"hash" : "6fcf0f666c0f6f1e1cd8f397b41ed176"
},
- "login-Jira" : {
+ "login-Jira" : {
"name" : "login-Jira",
"rule" : ".login-Jira",
"hash" : "0ddadec77a95c1efc398886252ebeda9"
},
- "login-LDAP" : {
+ "login-LDAP" : {
"name" : "login-LDAP",
"rule" : ".login-LDAP",
"hash" : "5b4e01ddf35cd40c8f061c90abc89b6c"
},
- "login-Linkedin" : {
+ "login-Linkedin" : {
"name" : "login-Linkedin",
"rule" : ".login-Linkedin",
"hash" : "0dd89825046fa4fd0fe402aa2cd55fd1"
},
- "login-Openid" : {
+ "login-Openid" : {
"name" : "login-Openid",
"rule" : ".login-Openid",
"hash" : "9267ffbb8d4e6dee409c4d8fa2d50c0a"
},
- "login-Persona" : {
+ "login-Persona" : {
"name" : "login-Persona",
"rule" : ".login-Persona",
"hash" : "949faf7bf5ed377c06aa480da1f42b74"
},
- "login-Phabricator" : {
+ "login-Phabricator" : {
"name" : "login-Phabricator",
"rule" : ".login-Phabricator",
"hash" : "fad258eb347a1ccf5800b0ee2d8e6e49"
},
- "login-TwitchTV" : {
+ "login-TwitchTV" : {
"name" : "login-TwitchTV",
"rule" : ".login-TwitchTV",
"hash" : "dbaa3f5e58fceb86598b2951fc5f9508"
},
- "login-Twitter" : {
+ "login-Twitter" : {
"name" : "login-Twitter",
"rule" : ".login-Twitter",
"hash" : "0b64983507a720b365474b778a966bab"
},
- "login-Yahoo" : {
+ "login-WordPressCOM" : {
+ "name" : "login-WordPressCOM",
+ "rule" : ".login-WordPressCOM",
+ "hash" : "c22a183bfb1e46deeab864223ec48db9"
+ },
+ "login-Yahoo" : {
"name" : "login-Yahoo",
"rule" : ".login-Yahoo",
"hash" : "1cc6fceee294045fe6d1c1d3aa31d2c1"
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1254,6 +1254,7 @@
'PhabricatorAuthProviderOAuthGitHub' => 'applications/auth/provider/PhabricatorAuthProviderOAuthGitHub.php',
'PhabricatorAuthProviderOAuthGoogle' => 'applications/auth/provider/PhabricatorAuthProviderOAuthGoogle.php',
'PhabricatorAuthProviderOAuthTwitch' => 'applications/auth/provider/PhabricatorAuthProviderOAuthTwitch.php',
+ 'PhabricatorAuthProviderOAuthWordPress' => 'applications/auth/provider/PhabricatorAuthProviderOAuthWordPress.php',
'PhabricatorAuthProviderPassword' => 'applications/auth/provider/PhabricatorAuthProviderPassword.php',
'PhabricatorAuthProviderPersona' => 'applications/auth/provider/PhabricatorAuthProviderPersona.php',
'PhabricatorAuthRegisterController' => 'applications/auth/controller/PhabricatorAuthRegisterController.php',
@@ -4041,6 +4042,7 @@
'PhabricatorAuthProviderOAuthGitHub' => 'PhabricatorAuthProviderOAuth2',
'PhabricatorAuthProviderOAuthGoogle' => 'PhabricatorAuthProviderOAuth2',
'PhabricatorAuthProviderOAuthTwitch' => 'PhabricatorAuthProviderOAuth2',
+ 'PhabricatorAuthProviderOAuthWordPress' => 'PhabricatorAuthProviderOAuth2',
'PhabricatorAuthProviderPassword' => 'PhabricatorAuthProvider',
'PhabricatorAuthProviderPersona' => 'PhabricatorAuthProvider',
'PhabricatorAuthRegisterController' => 'PhabricatorAuthController',
diff --git a/src/applications/auth/provider/PhabricatorAuthProviderOAuthWordPress.php b/src/applications/auth/provider/PhabricatorAuthProviderOAuthWordPress.php
new file mode 100644
--- /dev/null
+++ b/src/applications/auth/provider/PhabricatorAuthProviderOAuthWordPress.php
@@ -0,0 +1,38 @@
+<?php
+
+final class PhabricatorAuthProviderOAuthWordPress
+ extends PhabricatorAuthProviderOAuth2 {
+
+ 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 PhutilAuthAdapterOAuthWordPress();
+ }
+
+ protected function getLoginIcon() {
+ return 'WordPressCOM';
+ }
+}
diff --git a/webroot/rsrc/css/sprite-login.css b/webroot/rsrc/css/sprite-login.css
--- a/webroot/rsrc/css/sprite-login.css
+++ b/webroot/rsrc/css/sprite-login.css
@@ -86,6 +86,10 @@
background-position: 0px -140px;
}
-.login-Yahoo {
+.login-WordPressCOM {
background-position: -35px -140px;
}
+
+.login-Yahoo {
+ background-position: -70px -140px;
+}
diff --git a/webroot/rsrc/image/sprite-login-X2.png b/webroot/rsrc/image/sprite-login-X2.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/webroot/rsrc/image/sprite-login.png b/webroot/rsrc/image/sprite-login.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 11:21 PM (6 d, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7480267
Default Alt Text
D9019.diff (7 KB)
Attached To
Mode
D9019: WordPress.com OAuth2 plugin
Attached
Detach File
Event Timeline
Log In to Comment