tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r1308244 [2/2] - in /tuscany/sca-cpp/trunk: hosting/server/ hosting/server/htdocs/ hosting/server/htdocs/app/ hosting/server/htdocs/login/ hosting/server/htdocs/public/notauth/ hosting/server/htdocs/public/notfound/ hosting/server/htdocs/pu...
Date Mon, 02 Apr 2012 06:23:37 GMT
Modified: tuscany/sca-cpp/trunk/modules/oauth/start-test
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/oauth/start-test?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/oauth/start-test (original)
+++ tuscany/sca-cpp/trunk/modules/oauth/start-test Mon Apr  2 06:23:35 2012
@@ -17,21 +17,24 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
+# For this module to work, add the www.example.com domain to your /etc/hosts as follows:
+# 127.0.0.1 www.example.com
+
 # Setup
-../../ubuntu/ip-redirect-all 80 8090
-../../ubuntu/ip-redirect-all 443 8453
+#../../ubuntu/ip-redirect-all 80 8090
+#../../ubuntu/ip-redirect-all 443 8453
 
 ../../components/cache/memcached-start tmp 11212
 ../../components/cache/memcached-start tmp 11213
 
-../../modules/http/ssl-ca-conf tmp localhost
-../../modules/http/ssl-cert-conf tmp localhost
-../../modules/http/httpd-conf tmp localhost 8090/80 htdocs
-../../modules/http/httpd-ssl-conf tmp 8453/443
+../../modules/http/ssl-ca-conf tmp www.example.com
+../../modules/http/ssl-cert-conf tmp www.example.com
+../../modules/http/httpd-conf tmp www.example.com 8090 htdocs
+../../modules/http/httpd-ssl-conf tmp 8453
 
 ./oauth-conf tmp
-./oauth-memcached-conf tmp localhost 11212
-./oauth-memcached-conf tmp localhost 11213
+./oauth-memcached-conf tmp www.example.com 11212
+./oauth-memcached-conf tmp www.example.com 11213
 
 # Configure your app keys here
 ./oauth1-appkey-conf tmp twitter.com app2345 secret7890
@@ -41,7 +44,7 @@
 
 # For this test to work you need to add your oauth user id to the
 # authorized user group
-../../modules/http/group-auth-conf tmp 123456
+../../modules/http/group-auth-conf tmp jane@example.com
 
 ../../modules/server/server-conf tmp
 ../../modules/server/scheme-conf tmp

Modified: tuscany/sca-cpp/trunk/modules/openid/htdocs/login/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/openid/htdocs/login/index.html?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/openid/htdocs/login/index.html (original)
+++ tuscany/sca-cpp/trunk/modules/openid/htdocs/login/index.html Mon Apr  2 06:23:35 2012
@@ -55,9 +55,16 @@ if (typeof(openidReferrer()) == 'undefin
     document.location = '/';
 }
 
+function clearauthcookie() {
+    document.cookie = 'TuscanyOpenAuth=; expires=' + new Date(1970,01,01).toGMTString() +
'; domain=.' + domainname(window.location.hostname) + '; path=/';
+    document.cookie = 'TuscanyOAuth1=; expires=' + new Date(1970,01,01).toGMTString() + ';
domain=.' + domainname(window.location.hostname) + '; path=/';
+    document.cookie = 'TuscanyOAuth2=; expires=' + new Date(1970,01,01).toGMTString() + ';
domain=.' + domainname(window.location.hostname) + '; path=/';
+    document.cookie = 'TuscanyOpenIDAuth=; expires=' + new Date(1970,01,01).toGMTString()
+ '; domain=.' + domainname(window.location.hostname) + '; path=/';
+    return true;
+}
+
 function submitSignin(w) {
-    var reset = 'TuscanyOpenAuth=; expires=' + new Date(1970,01,01).toGMTString() + '; domain=.'
+ window.location.hostname + '; path=/';
-    document.cookie = reset;
+    clearauthcookie();
     document.signin.openid_identifier.value = w();
     document.signin.action = openidReferrer();
     document.signin.submit();

Modified: tuscany/sca-cpp/trunk/modules/openid/htdocs/logout/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/openid/htdocs/logout/index.html?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/openid/htdocs/logout/index.html (original)
+++ tuscany/sca-cpp/trunk/modules/openid/htdocs/logout/index.html Mon Apr  2 06:23:35 2012
@@ -31,9 +31,16 @@
 
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
+function clearauthcookie() {
+    document.cookie = 'TuscanyOpenAuth=; expires=' + new Date(1970,01,01).toGMTString() +
'; domain=.' + domainname(window.location.hostname) + '; path=/';
+    document.cookie = 'TuscanyOAuth1=; expires=' + new Date(1970,01,01).toGMTString() + ';
domain=.' + domainname(window.location.hostname) + '; path=/';
+    document.cookie = 'TuscanyOAuth2=; expires=' + new Date(1970,01,01).toGMTString() + ';
domain=.' + domainname(window.location.hostname) + '; path=/';
+    document.cookie = 'TuscanyOpenIDAuth=; expires=' + new Date(1970,01,01).toGMTString()
+ '; domain=.' + domainname(window.location.hostname) + '; path=/';
+    return true;
+}
+
 function submitSignout() {
-    var reset = 'TuscanyOpenAuth=; expires=' + new Date(1970,01,01).toGMTString() + '; domain=.'
+ window.location.hostname + '; path=/';
-    document.cookie = reset;
+    clearauthcookie();
     document.signout.submit();
     return true;
 }

Modified: tuscany/sca-cpp/trunk/modules/openid/openid-conf
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/openid/openid-conf?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/openid/openid-conf (original)
+++ tuscany/sca-cpp/trunk/modules/openid/openid-conf Mon Apr  2 06:23:35 2012
@@ -58,7 +58,7 @@ AuthName "$host"
 Require valid-user
 AuthOpenIDEnabled On
 AuthOpenIDCookiePath /
-AuthOpenIDCookieName TuscanyOpenAuth
+AuthOpenIDCookieName TuscanyOpenIDAuth
 AuthOpenIDLoginPage /login/
 AuthOpenIDAXAdd REMOTE_USER http://axschema.org/contact/email
 AuthOpenIDAXAdd EMAIL http://axschema.org/contact/email

Modified: tuscany/sca-cpp/trunk/modules/openid/start-test
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/openid/start-test?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/openid/start-test (original)
+++ tuscany/sca-cpp/trunk/modules/openid/start-test Mon Apr  2 06:23:35 2012
@@ -31,9 +31,9 @@
 ./openid-memcached-conf tmp localhost 11213
 ./openid-step2-conf tmp
 
-# For this test to work you need to add your openid to the
-# the authorized user group
-../../modules/http/group-auth-conf tmp https://www.google.com/accounts/o8/id?id=1234567
+# For this test to work you need to add your openid (or email address if
+# available from your openid attributes to the the authorized user group
+../../modules/http/group-auth-conf tmp jane@example.com
 
 ../../modules/server/server-conf tmp
 ../../modules/server/scheme-conf tmp

Modified: tuscany/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html (original)
+++ tuscany/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html Mon Apr
 2 06:23:35 2012
@@ -45,7 +45,7 @@ function queryParams() {
 function openauthReferrer() {
     r = queryParams()['openauth_referrer'];
     if (typeof(r) == 'undefined')
-        return r;
+        return '/';
     q = r.indexOf('?');
     if (q > 0)
         return r.substring(0, q);
@@ -57,8 +57,7 @@ if (typeof(openauthReferrer()) == 'undef
 }
 
 function submitOpenIDSignin(w) {
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
+    clearauthcookie();
     document.openIDSignin.openid_identifier.value = w();
     document.openIDSignin.action = openauthReferrer();
     document.openIDSignin.submit();
@@ -106,46 +105,48 @@ function withXRDSEndpoint() {
 
 function submitOAuth2Signin(w) {
     parms = w();
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
-    document.oauth2Signin.mod_oauth2_authorize.value = parms[0];
-    document.oauth2Signin.mod_oauth2_access_token.value = parms[1];
-    document.oauth2Signin.mod_oauth2_client_id.value = parms[2];
-    document.oauth2Signin.mod_oauth2_info.value = parms[3];
-    document.oauth2Signin.action = openauthReferrer();
+    clearauthcookie();
+    document.oauth2Signin.oauth2_authorize.value = parms[0];
+    document.oauth2Signin.oauth2_access_token.value = parms[1];
+    document.oauth2Signin.oauth2_client_id.value = parms[2];
+    document.oauth2Signin.oauth2_info.value = parms[3];
+    document.oauth2Signin.oauth2_scope.value = parms[4];
+    document.oauth2Signin.oauth2_display.value = parms[5];
+    document.oauth2Signin.openauth_referrer.value = openauthReferrer();
+    document.oauth2Signin.action = '/oauth2/authorize/';
     document.oauth2Signin.submit();
 }
 
 function withFacebook() {
-    var parms = ['https://graph.facebook.com/oauth/authorize', 'https://graph.facebook.com/oauth/access_token',
'testfacebookapp', 'https://graph.facebook.com/me'];
+    var parms = ['https://graph.facebook.com/oauth/authorize', 'https://graph.facebook.com/oauth/access_token',
'facebook.com', 'https://graph.facebook.com/me', 'email', 'page'];
     return parms;
 }
 
 function withGithub() {
-    var parms = ['https://github.com/login/oauth/authorize', 'https://github.com/login/oauth/access_token',
'testgithubapp', 'https://github.com/api/v2/json/user/show'];
+    var parms = ['https://github.com/login/oauth/authorize', 'https://github.com/login/oauth/access_token',
'github.com', 'https://github.com/api/v2/json/user/show', 'email', ''];
     return parms;
 }
 
 function submitOAuth1Signin(w) {
     parms = w();
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
-    document.oauth1Signin.mod_oauth1_request_token.value = parms[0];
-    document.oauth1Signin.mod_oauth1_authorize.value = parms[1];
-    document.oauth1Signin.mod_oauth1_access_token.value = parms[2];
-    document.oauth1Signin.mod_oauth1_client_id.value = parms[3];
-    document.oauth1Signin.mod_oauth1_info.value = parms[4];
-    document.oauth1Signin.action = openauthReferrer();
+    clearauthcookie();
+    document.oauth1Signin.oauth1_request_token.value = parms[0];
+    document.oauth1Signin.oauth1_authorize.value = parms[1];
+    document.oauth1Signin.oauth1_access_token.value = parms[2];
+    document.oauth1Signin.oauth1_client_id.value = parms[3];
+    document.oauth1Signin.oauth1_info.value = parms[4];
+    document.oauth1Signin.openauth_referrer.value = openauthReferrer();
+    document.oauth1Signin.action = '/oauth1/authorize/';
     document.oauth1Signin.submit();
 }
 
 function withLinkedin() {
-    var parms = ['https://api.linkedin.com/uas/oauth/requestToken', 'https://www.linkedin.com/uas/oauth/authorize',
'https://api.linkedin.com/uas/oauth/accessToken', 'testlinkedinapp', 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,public-profile-url)'];
+    var parms = ['https://api.linkedin.com/uas/oauth/requestToken', 'https://www.linkedin.com/uas/oauth/authorize',
'https://api.linkedin.com/uas/oauth/accessToken', 'linkedin.com', 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,public-profile-url)'];
     return parms;
 }
 
 function withTwitter() {
-    var parms = ['https://api.twitter.com/oauth/request_token', 'https://api.twitter.com/oauth/authorize',
'https://api.twitter.com/oauth/access_token', 'testtwitterapp', 'https://api.twitter.com/1/statuses/user_timeline.json'];
+    var parms = ['https://api.twitter.com/oauth/request_token', 'https://api.twitter.com/oauth/authorize',
'https://api.twitter.com/oauth/access_token', 'twitter.com', 'https://api.twitter.com/1/statuses/user_timeline.json'];
     return parms;
 }
 </script>
@@ -189,20 +190,22 @@ function withTwitter() {
 </form>
 
 <form name="oauth2Signin" action="/" method="GET">
-<input type="hidden" name="mod_oauth2_authorize" value=""/>
-<input type="hidden" name="mod_oauth2_access_token" value=""/>
-<input type="hidden" name="mod_oauth2_client_id" value=""/>
-<input type="hidden" name="mod_oauth2_info" value=""/>
-<input type="hidden" name="mod_oauth2_step" value="authorize"/>
+<input type="hidden" name="oauth2_authorize" value=""/>
+<input type="hidden" name="oauth2_access_token" value=""/>
+<input type="hidden" name="oauth2_client_id" value=""/>
+<input type="hidden" name="oauth2_info" value=""/>
+<input type="hidden" name="oauth2_scope" value=""/>
+<input type="hidden" name="oauth2_display" value=""/>
+<input type="hidden" name="openauth_referrer" value=""/>
 </form>
 
 <form name="oauth1Signin" action="/" method="GET">
-<input type="hidden" name="mod_oauth1_request_token" value=""/>
-<input type="hidden" name="mod_oauth1_authorize" value=""/>
-<input type="hidden" name="mod_oauth1_access_token" value=""/>
-<input type="hidden" name="mod_oauth1_client_id" value=""/>
-<input type="hidden" name="mod_oauth1_info" value=""/>
-<input type="hidden" name="mod_oauth1_step" value="authorize"/>
+<input type="hidden" name="oauth1_request_token" value=""/>
+<input type="hidden" name="oauth1_authorize" value=""/>
+<input type="hidden" name="oauth1_access_token" value=""/>
+<input type="hidden" name="oauth1_client_id" value=""/>
+<input type="hidden" name="oauth1_info" value=""/>
+<input type="hidden" name="openauth_referrer" value=""/>
 </form>
 
 </body>

Modified: tuscany/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html (original)
+++ tuscany/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html Mon
Apr  2 06:23:35 2012
@@ -33,8 +33,7 @@
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
 function submitSignout() {
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
+    clearauthcookie();
     document.signout.submit();
     return true;
 }

Modified: tuscany/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html (original)
+++ tuscany/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html Mon Apr
 2 06:23:35 2012
@@ -45,7 +45,7 @@ function queryParams() {
 function openauthReferrer() {
     r = queryParams()['openauth_referrer'];
     if (typeof(r) == 'undefined')
-        return r;
+        return '/';
     q = r.indexOf('?');
     if (q > 0)
         return r.substring(0, q);
@@ -57,8 +57,7 @@ if (typeof(openauthReferrer()) == 'undef
 }
 
 function submitOpenIDSignin(w) {
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
+    clearauthcookie();
     document.openIDSignin.openid_identifier.value = w();
     document.openIDSignin.action = openauthReferrer();
     document.openIDSignin.submit();
@@ -106,46 +105,48 @@ function withXRDSEndpoint() {
 
 function submitOAuth2Signin(w) {
     parms = w();
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
-    document.oauth2Signin.mod_oauth2_authorize.value = parms[0];
-    document.oauth2Signin.mod_oauth2_access_token.value = parms[1];
-    document.oauth2Signin.mod_oauth2_client_id.value = parms[2];
-    document.oauth2Signin.mod_oauth2_info.value = parms[3];
-    document.oauth2Signin.action = openauthReferrer();
+    clearauthcookie();
+    document.oauth2Signin.oauth2_authorize.value = parms[0];
+    document.oauth2Signin.oauth2_access_token.value = parms[1];
+    document.oauth2Signin.oauth2_client_id.value = parms[2];
+    document.oauth2Signin.oauth2_info.value = parms[3];
+    document.oauth2Signin.oauth2_scope.value = parms[4];
+    document.oauth2Signin.oauth2_display.value = parms[5];
+    document.oauth2Signin.openauth_referrer.value = openauthReferrer();
+    document.oauth2Signin.action = '/oauth2/authorize/';
     document.oauth2Signin.submit();
 }
 
 function withFacebook() {
-    var parms = ['https://graph.facebook.com/oauth/authorize', 'https://graph.facebook.com/oauth/access_token',
'testfacebookapp', 'https://graph.facebook.com/me'];
+    var parms = ['https://graph.facebook.com/oauth/authorize', 'https://graph.facebook.com/oauth/access_token',
'facebook.com', 'https://graph.facebook.com/me', 'email', 'page'];
     return parms;
 }
 
 function withGithub() {
-    var parms = ['https://github.com/login/oauth/authorize', 'https://github.com/login/oauth/access_token',
'testgithubapp', 'https://github.com/api/v2/json/user/show'];
+    var parms = ['https://github.com/login/oauth/authorize', 'https://github.com/login/oauth/access_token',
'github.com', 'https://github.com/api/v2/json/user/show', 'email', ''];
     return parms;
 }
 
 function submitOAuth1Signin(w) {
     parms = w();
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
-    document.oauth1Signin.mod_oauth1_request_token.value = parms[0];
-    document.oauth1Signin.mod_oauth1_authorize.value = parms[1];
-    document.oauth1Signin.mod_oauth1_access_token.value = parms[2];
-    document.oauth1Signin.mod_oauth1_client_id.value = parms[3];
-    document.oauth1Signin.mod_oauth1_info.value = parms[4];
-    document.oauth1Signin.action = openauthReferrer();
+    clearauthcookie();
+    document.oauth1Signin.oauth1_request_token.value = parms[0];
+    document.oauth1Signin.oauth1_authorize.value = parms[1];
+    document.oauth1Signin.oauth1_access_token.value = parms[2];
+    document.oauth1Signin.oauth1_client_id.value = parms[3];
+    document.oauth1Signin.oauth1_info.value = parms[4];
+    document.oauth1Signin.openauth_referrer.value = openauthReferrer();
+    document.oauth1Signin.action = '/oauth1/authorize/';
     document.oauth1Signin.submit();
 }
 
 function withLinkedin() {
-    var parms = ['https://api.linkedin.com/uas/oauth/requestToken', 'https://www.linkedin.com/uas/oauth/authorize',
'https://api.linkedin.com/uas/oauth/accessToken', 'testlinkedinapp', 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,public-profile-url)'];
+    var parms = ['https://api.linkedin.com/uas/oauth/requestToken', 'https://www.linkedin.com/uas/oauth/authorize',
'https://api.linkedin.com/uas/oauth/accessToken', 'linkedin.com', 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,public-profile-url)'];
     return parms;
 }
 
 function withTwitter() {
-    var parms = ['https://api.twitter.com/oauth/request_token', 'https://api.twitter.com/oauth/authorize',
'https://api.twitter.com/oauth/access_token', 'testtwitterapp', 'https://api.twitter.com/1/statuses/user_timeline.json'];
+    var parms = ['https://api.twitter.com/oauth/request_token', 'https://api.twitter.com/oauth/authorize',
'https://api.twitter.com/oauth/access_token', 'twitter.com', 'https://api.twitter.com/1/statuses/user_timeline.json'];
     return parms;
 }
 </script>
@@ -189,20 +190,22 @@ function withTwitter() {
 </form>
 
 <form name="oauth2Signin" action="/" method="GET">
-<input type="hidden" name="mod_oauth2_authorize" value=""/>
-<input type="hidden" name="mod_oauth2_access_token" value=""/>
-<input type="hidden" name="mod_oauth2_client_id" value=""/>
-<input type="hidden" name="mod_oauth2_info" value=""/>
-<input type="hidden" name="mod_oauth2_step" value="authorize"/>
+<input type="hidden" name="oauth2_authorize" value=""/>
+<input type="hidden" name="oauth2_access_token" value=""/>
+<input type="hidden" name="oauth2_client_id" value=""/>
+<input type="hidden" name="oauth2_info" value=""/>
+<input type="hidden" name="oauth2_scope" value=""/>
+<input type="hidden" name="oauth2_display" value=""/>
+<input type="hidden" name="openauth_referrer" value=""/>
 </form>
 
 <form name="oauth1Signin" action="/" method="GET">
-<input type="hidden" name="mod_oauth1_request_token" value=""/>
-<input type="hidden" name="mod_oauth1_authorize" value=""/>
-<input type="hidden" name="mod_oauth1_access_token" value=""/>
-<input type="hidden" name="mod_oauth1_client_id" value=""/>
-<input type="hidden" name="mod_oauth1_info" value=""/>
-<input type="hidden" name="mod_oauth1_step" value="authorize"/>
+<input type="hidden" name="oauth1_request_token" value=""/>
+<input type="hidden" name="oauth1_authorize" value=""/>
+<input type="hidden" name="oauth1_access_token" value=""/>
+<input type="hidden" name="oauth1_client_id" value=""/>
+<input type="hidden" name="oauth1_info" value=""/>
+<input type="hidden" name="openauth_referrer" value=""/>
 </form>
 
 </body>

Modified: tuscany/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html (original)
+++ tuscany/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html Mon Apr
 2 06:23:35 2012
@@ -33,12 +33,12 @@
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
 function submitSignout() {
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
+    clearauthcookie();
     document.signout.submit();
     return true;
 }
 </script>
 <input type="button" onclick="submitSignout()" value="Sign out"/>
 </form>
-</body></html>
+</body>
+</html>

Modified: tuscany/sca-cpp/trunk/samples/store-cluster/htdocs/login/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cluster/htdocs/login/index.html?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cluster/htdocs/login/index.html (original)
+++ tuscany/sca-cpp/trunk/samples/store-cluster/htdocs/login/index.html Mon Apr  2 06:23:35
2012
@@ -45,7 +45,7 @@ function queryParams() {
 function openauthReferrer() {
     r = queryParams()['openauth_referrer'];
     if (typeof(r) == 'undefined')
-        return r;
+        return '/';
     q = r.indexOf('?');
     if (q > 0)
         return r.substring(0, q);
@@ -57,8 +57,7 @@ if (typeof(openauthReferrer()) == 'undef
 }
 
 function submitOpenIDSignin(w) {
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
+    clearauthcookie();
     document.openIDSignin.openid_identifier.value = w();
     document.openIDSignin.action = openauthReferrer();
     document.openIDSignin.submit();
@@ -106,46 +105,48 @@ function withXRDSEndpoint() {
 
 function submitOAuth2Signin(w) {
     parms = w();
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
-    document.oauth2Signin.mod_oauth2_authorize.value = parms[0];
-    document.oauth2Signin.mod_oauth2_access_token.value = parms[1];
-    document.oauth2Signin.mod_oauth2_client_id.value = parms[2];
-    document.oauth2Signin.mod_oauth2_info.value = parms[3];
-    document.oauth2Signin.action = openauthReferrer();
+    clearauthcookie();
+    document.oauth2Signin.oauth2_authorize.value = parms[0];
+    document.oauth2Signin.oauth2_access_token.value = parms[1];
+    document.oauth2Signin.oauth2_client_id.value = parms[2];
+    document.oauth2Signin.oauth2_info.value = parms[3];
+    document.oauth2Signin.oauth2_scope.value = parms[4];
+    document.oauth2Signin.oauth2_display.value = parms[5];
+    document.oauth2Signin.openauth_referrer.value = openauthReferrer();
+    document.oauth2Signin.action = '/oauth2/authorize/';
     document.oauth2Signin.submit();
 }
 
 function withFacebook() {
-    var parms = ['https://graph.facebook.com/oauth/authorize', 'https://graph.facebook.com/oauth/access_token',
'testfacebookapp', 'https://graph.facebook.com/me'];
+    var parms = ['https://graph.facebook.com/oauth/authorize', 'https://graph.facebook.com/oauth/access_token',
'facebook.com', 'https://graph.facebook.com/me', 'email', 'page'];
     return parms;
 }
 
 function withGithub() {
-    var parms = ['https://github.com/login/oauth/authorize', 'https://github.com/login/oauth/access_token',
'testgithubapp', 'https://github.com/api/v2/json/user/show'];
+    var parms = ['https://github.com/login/oauth/authorize', 'https://github.com/login/oauth/access_token',
'github.com', 'https://github.com/api/v2/json/user/show', 'email', ''];
     return parms;
 }
 
 function submitOAuth1Signin(w) {
     parms = w();
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
-    document.oauth1Signin.mod_oauth1_request_token.value = parms[0];
-    document.oauth1Signin.mod_oauth1_authorize.value = parms[1];
-    document.oauth1Signin.mod_oauth1_access_token.value = parms[2];
-    document.oauth1Signin.mod_oauth1_client_id.value = parms[3];
-    document.oauth1Signin.mod_oauth1_info.value = parms[4];
-    document.oauth1Signin.action = openauthReferrer();
+    clearauthcookie();
+    document.oauth1Signin.oauth1_request_token.value = parms[0];
+    document.oauth1Signin.oauth1_authorize.value = parms[1];
+    document.oauth1Signin.oauth1_access_token.value = parms[2];
+    document.oauth1Signin.oauth1_client_id.value = parms[3];
+    document.oauth1Signin.oauth1_info.value = parms[4];
+    document.oauth1Signin.openauth_referrer.value = openauthReferrer();
+    document.oauth1Signin.action = '/oauth1/authorize/';
     document.oauth1Signin.submit();
 }
 
 function withLinkedin() {
-    var parms = ['https://api.linkedin.com/uas/oauth/requestToken', 'https://www.linkedin.com/uas/oauth/authorize',
'https://api.linkedin.com/uas/oauth/accessToken', 'testlinkedinapp', 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,public-profile-url)'];
+    var parms = ['https://api.linkedin.com/uas/oauth/requestToken', 'https://www.linkedin.com/uas/oauth/authorize',
'https://api.linkedin.com/uas/oauth/accessToken', 'linkedin.com', 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,public-profile-url)'];
     return parms;
 }
 
 function withTwitter() {
-    var parms = ['https://api.twitter.com/oauth/request_token', 'https://api.twitter.com/oauth/authorize',
'https://api.twitter.com/oauth/access_token', 'testtwitterapp', 'https://api.twitter.com/1/statuses/user_timeline.json'];
+    var parms = ['https://api.twitter.com/oauth/request_token', 'https://api.twitter.com/oauth/authorize',
'https://api.twitter.com/oauth/access_token', 'twitter.com', 'https://api.twitter.com/1/statuses/user_timeline.json'];
     return parms;
 }
 </script>
@@ -189,20 +190,22 @@ function withTwitter() {
 </form>
 
 <form name="oauth2Signin" action="/" method="GET">
-<input type="hidden" name="mod_oauth2_authorize" value=""/>
-<input type="hidden" name="mod_oauth2_access_token" value=""/>
-<input type="hidden" name="mod_oauth2_client_id" value=""/>
-<input type="hidden" name="mod_oauth2_info" value=""/>
-<input type="hidden" name="mod_oauth2_step" value="authorize"/>
+<input type="hidden" name="oauth2_authorize" value=""/>
+<input type="hidden" name="oauth2_access_token" value=""/>
+<input type="hidden" name="oauth2_client_id" value=""/>
+<input type="hidden" name="oauth2_info" value=""/>
+<input type="hidden" name="oauth2_scope" value=""/>
+<input type="hidden" name="oauth2_display" value=""/>
+<input type="hidden" name="openauth_referrer" value=""/>
 </form>
 
 <form name="oauth1Signin" action="/" method="GET">
-<input type="hidden" name="mod_oauth1_request_token" value=""/>
-<input type="hidden" name="mod_oauth1_authorize" value=""/>
-<input type="hidden" name="mod_oauth1_access_token" value=""/>
-<input type="hidden" name="mod_oauth1_client_id" value=""/>
-<input type="hidden" name="mod_oauth1_info" value=""/>
-<input type="hidden" name="mod_oauth1_step" value="authorize"/>
+<input type="hidden" name="oauth1_request_token" value=""/>
+<input type="hidden" name="oauth1_authorize" value=""/>
+<input type="hidden" name="oauth1_access_token" value=""/>
+<input type="hidden" name="oauth1_client_id" value=""/>
+<input type="hidden" name="oauth1_info" value=""/>
+<input type="hidden" name="openauth_referrer" value=""/>
 </form>
 
 </body>

Modified: tuscany/sca-cpp/trunk/samples/store-cluster/htdocs/logout/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cluster/htdocs/logout/index.html?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cluster/htdocs/logout/index.html (original)
+++ tuscany/sca-cpp/trunk/samples/store-cluster/htdocs/logout/index.html Mon Apr  2 06:23:35
2012
@@ -33,8 +33,7 @@
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
 function submitSignout() {
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
+    clearauthcookie();
     document.signout.submit();
     return true;
 }

Modified: tuscany/sca-cpp/trunk/samples/store-python/htdocs/login/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-python/htdocs/login/index.html?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-python/htdocs/login/index.html (original)
+++ tuscany/sca-cpp/trunk/samples/store-python/htdocs/login/index.html Mon Apr  2 06:23:35
2012
@@ -32,8 +32,7 @@
 
 <script type="text/javascript">
 function submitFormSignin() {
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
+    clearauthcookie();
     document.formSignin.httpd_location.value = '/';
     document.formSignin.submit();
 }

Modified: tuscany/sca-cpp/trunk/samples/store-python/htdocs/logout/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-python/htdocs/logout/index.html?rev=1308244&r1=1308243&r2=1308244&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-python/htdocs/logout/index.html (original)
+++ tuscany/sca-cpp/trunk/samples/store-python/htdocs/logout/index.html Mon Apr  2 06:23:35
2012
@@ -33,8 +33,7 @@
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
 function submitSignout() {
-    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
-    document.cookie = reset;
+    clearauthcookie();
     document.signout.submit();
     return true;
 }



Mime
View raw message