[geeklog-hg] geeklog: Merge with Oauth20

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Aug 25 01:41:08 EDT 2013


changeset 9264:111e135f28a8
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/111e135f28a8
user: Tom <websitemaster at cogeco.net>
date: Sun Aug 25 01:08:58 2013 -0400
description:
Merge with Oauth20

diffstat:

 language/english.php                                      |    16 +-
 language/english_utf-8.php                                |    14 +-
 public_html/admin/install/config-install.php              |     9 +
 public_html/docs/english/config.html                      |    10 +-
 public_html/docs/japanese/config.html                     |     5 +
 public_html/images/google-login-icon.png                  |   Bin 
 public_html/images/microsoft-login-icon.png               |   Bin 
 public_html/images/oauth-login-with-sprite.png            |   Bin 
 public_html/images/yahoo-login-icon.png                   |   Bin 
 public_html/layout/denim/css_ltr/style.css                |    25 +
 public_html/layout/denim/css_rtl/style.css                |    25 +
 public_html/layout/denim/loginform_oauth.thtml            |    15 +-
 public_html/layout/modern_curve/css/form.css              |    25 +
 public_html/layout/modern_curve/loginform_oauth.thtml     |    11 +-
 public_html/layout/professional/loginform_oauth.thtml     |    12 +-
 public_html/layout/professional/style.css                 |    25 +
 public_html/layout/professional_css/css/form.css          |    25 +
 public_html/layout/professional_css/loginform_oauth.thtml |    12 +-
 public_html/lib-common.php                                |     3 +-
 public_html/users.php                                     |    43 +-
 public_html/usersettings.php                              |   128 +-
 sql/updates/mysql_2.0.0_to_2.0.1.php                      |    13 +-
 sql/updates/pgsql_2.0.0_to_2.0.1.php                      |    13 +-
 system/classes/http/LICENSE.txt                           |    36 +
 system/classes/http/http.php                              |  2092 +++++++++++
 system/classes/oauth/facebook.auth.class.php              |   245 -
 system/classes/oauth/linkedin.auth.class.php              |    76 -
 system/classes/oauth/oauth_client.php                     |  2375 +++++++++++++
 system/classes/oauth/twitter.auth.class.php               |   100 -
 system/classes/oauthhelper.class.php                      |   520 +-
 system/lib-security.php                                   |    55 +-
 31 files changed, 5123 insertions(+), 805 deletions(-)

diffs (truncated from 6358 to 300 lines):

diff -r 2aef7e84ecc5 -r 111e135f28a8 language/english.php
--- a/language/english.php	Mon Aug 19 21:35:14 2013 -0400
+++ b/language/english.php	Sun Aug 25 01:08:58 2013 -0400
@@ -183,7 +183,10 @@
     139 => "Click <a href=\"{$_CONF['site_url']}/\" rel=\"nofollow\">here</a> to return to the homepage",
     'facebook' => 'Login with Facebook',
     'twitter' => 'Login with Twitter',
-    'linkedin' => 'Login with LinkedIn', 
+    'linkedin' => 'Login with LinkedIn',
+    'google' => 'Login with Google',
+    'microsoft' => 'Login with Microsoft',
+    'yahoo' => 'Login with Yahoo',    
     'ctl' => 'Clear Cache'
 );
 
@@ -1940,7 +1943,16 @@
     'linkedin_consumer_secret' => "LinkedIn OAuth Secret Key",    
     'twitter_login' => "Enable OAuth Login Method Twitter",
     'twitter_consumer_key' => "Twitter OAuth Consumer Key",    
-    'twitter_consumer_secret' => "Twitter OAuth Consumer Secret",  
+    'twitter_consumer_secret' => "Twitter OAuth Consumer Secret",
+    'google_login' => "Enable OAuth Login Method Google",
+    'google_consumer_key' => "Google OAuth Consumer Key",
+    'google_consumer_secret' => "Google OAuth Consumer Secret",
+    'microsoft_login' => "Enable OAuth Login Method Microsoft",
+    'microsoft_consumer_key' => "Microsoft OAuth Consumer Key",
+    'microsoft_consumer_secret' => "Microsoft OAuth Consumer Secret",   
+    'yahoo_login' => "Enable OAuth Login Method Yahoo",
+    'yahoo_consumer_key' => "Yahoo OAuth Consumer Key",
+    'yahoo_consumer_secret' => "Yahoo OAuth Consumer Secret", 
     'spamx' => "Spam-X Actions",
     'sort_admin' => "Sort Links",
     'language' => "Default Language",
diff -r 2aef7e84ecc5 -r 111e135f28a8 language/english_utf-8.php
--- a/language/english_utf-8.php	Mon Aug 19 21:35:14 2013 -0400
+++ b/language/english_utf-8.php	Sun Aug 25 01:08:58 2013 -0400
@@ -183,7 +183,10 @@
     139 => "Click <a href=\"{$_CONF['site_url']}/\" rel=\"nofollow\">here</a> to return to the homepage",
     'facebook' => 'Login with Facebook',
     'twitter' => 'Login with Twitter',
-    'linkedin' => 'Login with LinkedIn', 
+    'linkedin' => 'Login with LinkedIn',
+    'google' => 'Login with Google',
+    'microsoft' => 'Login with Microsoft',
+    'yahoo' => 'Login with Yahoo',
     'ctl' => 'Clear Cache'
 );
 
@@ -1941,6 +1944,15 @@
     'twitter_login' => "Enable OAuth Login Method Twitter",
     'twitter_consumer_key' => "Twitter OAuth Consumer Key",    
     'twitter_consumer_secret' => "Twitter OAuth Consumer Secret",  
+    'google_login' => "Enable OAuth Login Method Google",
+    'google_consumer_key' => "Google OAuth Consumer Key",
+    'google_consumer_secret' => "Google OAuth Consumer Secret",
+    'microsoft_login' => "Enable OAuth Login Method Microsoft",
+    'microsoft_consumer_key' => "Microsoft OAuth Consumer Key",
+    'microsoft_consumer_secret' => "Microsoft OAuth Consumer Secret",   
+    'yahoo_login' => "Enable OAuth Login Method Yahoo",
+    'yahoo_consumer_key' => "Yahoo OAuth Consumer Key",
+    'yahoo_consumer_secret' => "Yahoo OAuth Consumer Secret",   
     'spamx' => "Spam-X Actions",
     'sort_admin' => "Sort Links",
     'language' => "Default Language",
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/admin/install/config-install.php
--- a/public_html/admin/install/config-install.php	Mon Aug 19 21:35:14 2013 -0400
+++ b/public_html/admin/install/config-install.php	Sun Aug 25 01:08:58 2013 -0400
@@ -241,6 +241,15 @@
     $c->add('twitter_login',0,'select',4,16,1,356,TRUE, $me, 16);
     $c->add('twitter_consumer_key','','text',4,16,NULL,357,TRUE, $me, 16);
     $c->add('twitter_consumer_secret','','text',4,16,NULL,358,TRUE, $me, 16);
+    $c->add('google_login',0,'select',4,16,1,359,TRUE, $me, 16);
+    $c->add('google_consumer_key','','text',4,16,NULL,360,TRUE, $me, 16);
+    $c->add('google_consumer_secret','','text',4,16,NULL,361,TRUE, $me, 16);    
+    $c->add('microsoft_login',0,'select',4,16,1,362,TRUE, $me, 16);
+    $c->add('microsoft_consumer_key','','text',4,16,NULL,363,TRUE, $me, 16);
+    $c->add('microsoft_consumer_secret','','text',4,16,NULL,364,TRUE, $me, 16);    
+    $c->add('yahoo_login',0,'select',4,16,1,365,TRUE, $me, 16);
+    $c->add('yahoo_consumer_key','','text',4,16,NULL,366,TRUE, $me, 16);
+    $c->add('yahoo_consumer_secret','','text',4,16,NULL,367,TRUE, $me, 16);    
     $c->add('aftersave_user','item','select',4,16,9,1340,TRUE, $me, 16);
     
     $c->add('tab_spamx', NULL, 'tab', 4, 17, NULL, 0, TRUE, $me, 17);
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/docs/english/config.html
--- a/public_html/docs/english/config.html	Mon Aug 19 21:35:14 2013 -0400
+++ b/public_html/docs/english/config.html	Sun Aug 25 01:08:58 2013 -0400
@@ -836,7 +836,7 @@
   <td valign="top"><a name="desc_user_login_method_oauth">oauth</a></td>
   <td valign="top"><code>false</code></td>
   <td valign="top">Whether to allow logins using <a href="http://oauth.net/">OAuth</a>. This will display a special OAuth login below the normal login field.<br>
-    <strong>Note:</strong> Currently only OAuth 1.0 is supported. Current login methods supported: Facebook, Twitter and LinkedIn.<br>Please note that to enable login for a 
+    <strong>Note:</strong> Currently only OAuth 1.0 is supported. Current login methods supported: Facebook, Twitter, LinkedIn, Google and Microsoft.<br>Please note that to enable login for a 
     specific method, you need an authorization class in <tt>system/classes/oauth</tt>. If you only want to allow Facebook but not Twitter users (or vice versa), simply
     remove the class file for the unwanted service(s) or use the config options below. You must also update the config options below with the correct key and secret string 
     ($consumer_secret) values. The PHP extension OpenSSL is required to be loaded.<br>
@@ -892,6 +892,14 @@
   <td valign="top">Required to use Twitter OAuth login method. Visit this <a href="https://twitter.com/apps">Twitter Application page</a> 
   to create an application to receive your consumer key and secret.<br>
   See our <a href="http://wiki.geeklog.net/index.php/OAuth">Wiki OAuth page</a> for more information.</td></tr>
+  
+  
+  
+  
+  
+  
+  
+  
 <tr>
   <td valign="top"><a name="desc_aftersave_user">aftersave_user</a></td>
   <td valign="top"><code>'item'</code></td>
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/docs/japanese/config.html
--- a/public_html/docs/japanese/config.html	Mon Aug 19 21:35:14 2013 -0400
+++ b/public_html/docs/japanese/config.html	Sun Aug 25 01:08:58 2013 -0400
@@ -787,6 +787,11 @@
   <td valign="top"><code>''</code></td>
   <td valign="top">Twitter OAuth ログイン利用時にはå
¥åŠ›ã—てください。アプリケーションを作成してconsumer keyと secretを取得するには、この<a href="https://twitter.com/apps">Twitter Application page</a>を参ç
§ã—てください。<br>
   さらに詳しいæƒ
報は、<a href="http://wiki.geeklog.net/index.php/OAuth">Wiki OAuth page</a>を参ç
§ã—てください。</td></tr>
+  
+  
+  
+  
+  
 <tr>
   <td valign="top"><a name="desc_aftersave_user">ユーザー保存後の画面遷移(aftersave_user)</a></td>
   <td valign="top"><code>作成したé 
目を表示する(item)</code></td>
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/images/google-login-icon.png
Binary file public_html/images/google-login-icon.png has changed
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/images/microsoft-login-icon.png
Binary file public_html/images/microsoft-login-icon.png has changed
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/images/oauth-login-with-sprite.png
Binary file public_html/images/oauth-login-with-sprite.png has changed
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/images/yahoo-login-icon.png
Binary file public_html/images/yahoo-login-icon.png has changed
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/layout/denim/css_ltr/style.css
--- a/public_html/layout/denim/css_ltr/style.css	Mon Aug 19 21:35:14 2013 -0400
+++ b/public_html/layout/denim/css_ltr/style.css	Sun Aug 25 01:08:58 2013 -0400
@@ -1599,6 +1599,31 @@
   Login Form
 --------------------------------------*/
 
+/* authentication buttons */
+#login_facebook{left:0px;width:141px;}
+#login_facebook{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position:0 0;}
+
+#login_twitter{left:0px;width:141px;}
+#login_twitter{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -23px;}
+
+#login_linkedin{left:0px;width:141px;}
+#login_linkedin{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -44px;}
+
+#login_google{left:0px;width:141px;}
+#login_google{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -66px;}
+
+#login_yahoo{left:0px;width:141px;}
+#login_yahoo{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -88px;}
+
+#login_microsoft{left:0px;width:141px;}
+#login_microsoft{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -110px;}
+
+#login_github{left:0px;width:141px;}
+#login_github{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -132px;}
+
+#login_openid{left:0px;width:141px;}
+#login_openid{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -154px;}
+
 #loginform fieldset {
   margin-top: 15px;
   padding: 0px;
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/layout/denim/css_rtl/style.css
--- a/public_html/layout/denim/css_rtl/style.css	Mon Aug 19 21:35:14 2013 -0400
+++ b/public_html/layout/denim/css_rtl/style.css	Sun Aug 25 01:08:58 2013 -0400
@@ -1599,6 +1599,31 @@
   Login Form
 --------------------------------------*/
 
+/* authentication buttons */
+#login_facebook{left:0px;width:141px;}
+#login_facebook{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position:0 0;}
+
+#login_twitter{left:0px;width:141px;}
+#login_twitter{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -23px;}
+
+#login_linkedin{left:0px;width:141px;}
+#login_linkedin{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -44px;}
+
+#login_google{left:0px;width:141px;}
+#login_google{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -66px;}
+
+#login_yahoo{left:0px;width:141px;}
+#login_yahoo{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -88px;}
+
+#login_microsoft{left:0px;width:141px;}
+#login_microsoft{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -110px;}
+
+#login_github{left:0px;width:141px;}
+#login_github{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -132px;}
+
+#login_openid{left:0px;width:141px;}
+#login_openid{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -154px;}
+
 #loginform fieldset {
   margin-top: 15px;
   padding: 0px;
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/layout/denim/loginform_oauth.thtml
--- a/public_html/layout/denim/loginform_oauth.thtml	Mon Aug 19 21:35:14 2013 -0400
+++ b/public_html/layout/denim/loginform_oauth.thtml	Sun Aug 25 01:08:58 2013 -0400
@@ -1,11 +1,14 @@
-<!-- loginform_oauth.thtml { -->
+{# begin {templatelocation} #}
 
 <form class="third-party-login" action="{site_url}/users.php?oauth_login={oauth_service}" method="post">
-  <div>
-    <img alt="" src="{oauth_sign_in_image}"{xhtml}>
-    <input value="{lang_oauth_service}" type="submit" class="submit"{xhtml}>
-  </div>
+    <div>
+        {# OAuth Button Style 1: Image buttons (uncomment line below) #}
+        {# <input style="border:0;height:22px;width:141px;padding:0;margin:0;" type="submit" value="" id="login_{oauth_service}"{xhtml}> #}
+        
+        {# OAuth Button Style 2: Login buttons with icons (uncomment line below) #}
+        <img alt="" src="{oauth_sign_in_image}"{xhtml}><input value="{lang_oauth_service}" type="submit" class="submit"{xhtml}>
+    </div>
 </form>
 
-<!-- } loginform_oauth.thtml -->
+{# end {templatelocation} #}
 
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/layout/modern_curve/css/form.css
--- a/public_html/layout/modern_curve/css/form.css	Mon Aug 19 21:35:14 2013 -0400
+++ b/public_html/layout/modern_curve/css/form.css	Sun Aug 25 01:08:58 2013 -0400
@@ -69,6 +69,31 @@
   Login Form
 --------------------------------------*/
 
+/* authentication buttons */
+#login_facebook{left:0px;width:141px;}
+#login_facebook{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position:0 0;}
+
+#login_twitter{left:0px;width:141px;}
+#login_twitter{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -23px;}
+
+#login_linkedin{left:0px;width:141px;}
+#login_linkedin{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -44px;}
+
+#login_google{left:0px;width:141px;}
+#login_google{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -66px;}
+
+#login_yahoo{left:0px;width:141px;}
+#login_yahoo{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -88px;}
+
+#login_microsoft{left:0px;width:141px;}
+#login_microsoft{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -110px;}
+
+#login_github{left:0px;width:141px;}
+#login_github{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -132px;}
+
+#login_openid{left:0px;width:141px;}
+#login_openid{background:url('/images/oauth-login-with-sprite.png') no-repeat; background-position: 0 -154px;}
+
 /* Input sizing */
 form#loginform input,
 form#loginform select,
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/layout/modern_curve/loginform_oauth.thtml
--- a/public_html/layout/modern_curve/loginform_oauth.thtml	Mon Aug 19 21:35:14 2013 -0400
+++ b/public_html/layout/modern_curve/loginform_oauth.thtml	Sun Aug 25 01:08:58 2013 -0400
@@ -1,10 +1,13 @@
 {# begin {templatelocation} #}
 
 <form class="third-party-login" action="{site_url}/users.php?oauth_login={oauth_service}" method="post">
-  <div>
-    <img alt="" src="{oauth_sign_in_image}"{xhtml}>
-    <input value="{lang_oauth_service}" type="submit" class="submit"{xhtml}>
-  </div>
+    <div>
+        {# OAuth Button Style 1: Image buttons (uncomment line below) #}
+        {# <input style="border:0;height:22px;width:141px;padding:0;margin:0;" type="submit" value="" id="login_{oauth_service}"{xhtml}> #}
+        
+        {# OAuth Button Style 2: Login buttons with icons (uncomment line below) #}
+        <img alt="" src="{oauth_sign_in_image}"{xhtml}><input value="{lang_oauth_service}" type="submit" class="submit"{xhtml}>
+    </div>
 </form>
 
 {# end {templatelocation} #}
diff -r 2aef7e84ecc5 -r 111e135f28a8 public_html/layout/professional/loginform_oauth.thtml
--- a/public_html/layout/professional/loginform_oauth.thtml	Mon Aug 19 21:35:14 2013 -0400
+++ b/public_html/layout/professional/loginform_oauth.thtml	Sun Aug 25 01:08:58 2013 -0400
@@ -1,6 +1,10 @@
+{# begin {templatelocation} #}
+
 <form class="third-party-login" action="{site_url}/users.php?oauth_login={oauth_service}" method="post">
-  <div>
-    <img alt="" src="{oauth_sign_in_image}"{xhtml}>
-    <input value="{lang_oauth_service}" type="submit" class="submit"{xhtml}>
-  </div>
+    <div>
+        <input style="border:0;height:22px;width:141px;padding:0;margin:0;" type="submit" value="" id="login_{oauth_service}"{xhtml}>
+    </div>
 </form>
+
+{# end {templatelocation} #}



More information about the geeklog-cvs mailing list