tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r1154445 - in /tuscany/sca-cpp/trunk: modules/http/ modules/http/htdocs/login/ modules/http/htdocs/logout/ modules/oauth/ modules/oauth/htdocs/login/ modules/oauth/htdocs/logout/ modules/openid/htdocs/login/ modules/openid/htdocs/logout/ sa...
Date Sat, 06 Aug 2011 05:59:05 GMT
Author: jsdelfino
Date: Sat Aug  6 05:59:04 2011
New Revision: 1154445

URL: http://svn.apache.org/viewvc?rev=1154445&view=rev
Log:
Make authentication work with wildcard domains and increase authentication cookie max-age.

Modified:
    tuscany/sca-cpp/trunk/modules/http/htdocs/login/index.html
    tuscany/sca-cpp/trunk/modules/http/htdocs/logout/index.html
    tuscany/sca-cpp/trunk/modules/http/httpd-conf
    tuscany/sca-cpp/trunk/modules/http/open-auth-conf
    tuscany/sca-cpp/trunk/modules/oauth/htdocs/login/index.html
    tuscany/sca-cpp/trunk/modules/oauth/htdocs/login/mixed.html
    tuscany/sca-cpp/trunk/modules/oauth/htdocs/logout/index.html
    tuscany/sca-cpp/trunk/modules/oauth/mod-oauth1.cpp
    tuscany/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp
    tuscany/sca-cpp/trunk/modules/openid/htdocs/login/index.html
    tuscany/sca-cpp/trunk/modules/openid/htdocs/logout/index.html
    tuscany/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html
    tuscany/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html
    tuscany/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html
    tuscany/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html
    tuscany/sca-cpp/trunk/samples/store-cluster/htdocs/login/index.html
    tuscany/sca-cpp/trunk/samples/store-cluster/htdocs/logout/index.html
    tuscany/sca-cpp/trunk/samples/store-python/htdocs/login/index.html
    tuscany/sca-cpp/trunk/samples/store-python/htdocs/logout/index.html

Modified: tuscany/sca-cpp/trunk/modules/http/htdocs/login/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/htdocs/login/index.html?rev=1154445&r1=1154444&r2=1154445&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/htdocs/login/index.html (original)
+++ tuscany/sca-cpp/trunk/modules/http/htdocs/login/index.html Sat Aug  6 05:59:04 2011
@@ -31,7 +31,8 @@
 
 <script type="text/javascript">
 function submitFormSignin() {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.formSignin.httpd_location.value = '/';
     document.formSignin.submit();
 }

Modified: tuscany/sca-cpp/trunk/modules/http/htdocs/logout/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/htdocs/logout/index.html?rev=1154445&r1=1154444&r2=1154445&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/htdocs/logout/index.html (original)
+++ tuscany/sca-cpp/trunk/modules/http/htdocs/logout/index.html Sat Aug  6 05:59:04 2011
@@ -32,7 +32,8 @@
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
 function submitSignout() {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.signout.submit();
     return true;
 }

Modified: tuscany/sca-cpp/trunk/modules/http/httpd-conf
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/httpd-conf?rev=1154445&r1=1154444&r2=1154445&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/httpd-conf (original)
+++ tuscany/sca-cpp/trunk/modules/http/httpd-conf Sat Aug  6 05:59:04 2011
@@ -82,6 +82,8 @@ LogFormat "[%{%a %b %d %H:%M:%S %Y}t] [a
 CustomLog $root/logs/access_log combined
 CookieTracking on
 CookieName TuscanyVisitorId
+CookieStyle Cookie
+CookieExpires 31556926
 
 # Configure Mime types and default charsets
 TypesConfig $here/conf/mime.types
@@ -90,7 +92,7 @@ AddCharset utf-8 .js .css
 
 # Configure cache control
 SetEnvIf Request_URI "^/app.html$" must-revalidate
-Header onsuccess set Cache-Control "max-age=86400" env=!must-revalidate
+Header onsuccess set Cache-Control "max-age=604800" env=!must-revalidate
 Header set Cache-Control "must-revalidate, max-age=0" env=must-revalidate
 Header set Expires "Tue, 01 Jan 1980 00:00:00 GMT" env=must-revalidate
 

Modified: tuscany/sca-cpp/trunk/modules/http/open-auth-conf
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/open-auth-conf?rev=1154445&r1=1154444&r2=1154445&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/open-auth-conf (original)
+++ tuscany/sca-cpp/trunk/modules/http/open-auth-conf Sat Aug  6 05:59:04 2011
@@ -35,7 +35,7 @@ cat >>$root/conf/auth.conf <<EOF
 AuthType Open
 AuthName "$host"
 Session On
-SessionCookieName TuscanyOpenAuth domain=.$host;path=/;secure=TRUE
+SessionCookieName TuscanyOpenAuth domain=.$host; path=/; max-age=31556926
 SessionCryptoPassphrase $pw
 AuthOpenAuth On
 AuthOpenAuthLoginPage /login
@@ -53,5 +53,10 @@ Require valid-user
 SetHandler form-login-handler
 </Location>
 
+# Mark login page with a header
+<Location /login>
+Header set X-Login open-auth
+</Location>
+
 EOF
 

Modified: tuscany/sca-cpp/trunk/modules/oauth/htdocs/login/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/oauth/htdocs/login/index.html?rev=1154445&r1=1154444&r2=1154445&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/oauth/htdocs/login/index.html (original)
+++ tuscany/sca-cpp/trunk/modules/oauth/htdocs/login/index.html Sat Aug  6 05:59:04 2011
@@ -57,7 +57,8 @@ if (typeof(oauthReferrer()) == 'undefine
 
 function submitSignin2(w) {
     parms = w();
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.signin2.mod_oauth2_authorize.value = parms[0];
     document.signin2.mod_oauth2_access_token.value = parms[1];
     document.signin2.mod_oauth2_client_id.value = parms[2];
@@ -78,7 +79,8 @@ function withGithub() {
 
 function submitSignin1(w) {
     parms = w();
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.signin1.mod_oauth1_request_token.value = parms[0];
     document.signin1.mod_oauth1_authorize.value = parms[1];
     document.signin1.mod_oauth1_access_token.value = parms[2];

Modified: tuscany/sca-cpp/trunk/modules/oauth/htdocs/login/mixed.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/oauth/htdocs/login/mixed.html?rev=1154445&r1=1154444&r2=1154445&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/oauth/htdocs/login/mixed.html (original)
+++ tuscany/sca-cpp/trunk/modules/oauth/htdocs/login/mixed.html Sat Aug  6 05:59:04 2011
@@ -30,7 +30,8 @@
 
 <script type="text/javascript">
 function submitFormSignin() {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.formSignin.httpd_location.value = '/';
     document.formSignin.submit();
 }
@@ -61,7 +62,8 @@ if (typeof(openauthReferrer()) == 'undef
 }
 
 function submitOpenIDSignin(w) {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.openIDSignin.openid_identifier.value = w();
     document.openIDSignin.action = openauthReferrer();
     document.openIDSignin.submit();
@@ -109,7 +111,8 @@ function withXRDSEndpoint() {
 
 function submitOAuth2Signin(w) {
     parms = w();
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    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];
@@ -130,7 +133,8 @@ function withGithub() {
 
 function submitOAuth1Signin(w) {
     parms = w();
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    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];

Modified: tuscany/sca-cpp/trunk/modules/oauth/htdocs/logout/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/oauth/htdocs/logout/index.html?rev=1154445&r1=1154444&r2=1154445&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/oauth/htdocs/logout/index.html (original)
+++ tuscany/sca-cpp/trunk/modules/oauth/htdocs/logout/index.html Sat Aug  6 05:59:04 2011
@@ -32,7 +32,8 @@
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
 function submitSignout() {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ window.location.hostname + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.signout.submit();
     return true;
 }

Modified: tuscany/sca-cpp/trunk/modules/oauth/mod-oauth1.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/oauth/mod-oauth1.cpp?rev=1154445&r1=1154444&r2=1154445&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/oauth/mod-oauth1.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/oauth/mod-oauth1.cpp Sat Aug  6 05:59:04 2011
@@ -378,6 +378,7 @@ const failable<int> access_token(const l
         return mkfailure<int>(reason(prc));
 
     // Send session ID to the client in a cookie
+    debug(c_str(openauth::cookie(sid, httpd::hostName(sc.server))), "modoauth1::access_token::setcookie");
     apr_table_set(r->err_headers_out, "Set-Cookie", c_str(openauth::cookie(sid, httpd::hostName(sc.server))));
     return httpd::externalRedirect(httpd::url(r->uri, r), r);
 }

Modified: tuscany/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp?rev=1154445&r1=1154444&r2=1154445&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp Sat Aug  6 05:59:04 2011
@@ -203,7 +203,7 @@ const failable<int> access_token(const l
     if (!hasContent(tr))
         return mkfailure<int>(reason(tr));
     debug(tr, "modoauth2::access_token::response");
-    const list<value> tv = assoc<value>("access_token", httpd::queryArgs(join("",
convertValues<string>(content(tr)))));
+    const list<value> tv = assoc<value>("access_token", httpd::queryArgs(join("",
convertValues<string>(cadr<value>(content(tr))))));
     if (isNil(tv) || isNil(cdr(tv)))
         return mkfailure<int>("Couldn't retrieve access_token");
     debug(tv, "modoauth2::access_token::token");
@@ -230,6 +230,7 @@ const failable<int> access_token(const l
         return mkfailure<int>(reason(prc));
 
     // Send session ID to the client in a cookie
+    debug(c_str(openauth::cookie(sid, httpd::hostName(sc.server))), "modoauth2::access_token::setcookie");
     apr_table_set(r->err_headers_out, "Set-Cookie", c_str(openauth::cookie(sid, httpd::hostName(sc.server))));
     return httpd::externalRedirect(httpd::url(r->uri, r), r);
 }

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=1154445&r1=1154444&r2=1154445&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/openid/htdocs/login/index.html (original)
+++ tuscany/sca-cpp/trunk/modules/openid/htdocs/login/index.html Sat Aug  6 05:59:04 2011
@@ -56,7 +56,8 @@ if (typeof(openidReferrer()) == 'undefin
 }
 
 function submitSignin(w) {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     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=1154445&r1=1154444&r2=1154445&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/openid/htdocs/logout/index.html (original)
+++ tuscany/sca-cpp/trunk/modules/openid/htdocs/logout/index.html Sat Aug  6 05:59:04 2011
@@ -32,7 +32,8 @@
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
 function submitSignout() {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.signout.submit();
     return true;
 }

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=1154445&r1=1154444&r2=1154445&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 Sat Aug
 6 05:59:04 2011
@@ -56,7 +56,8 @@ if (typeof(openauthReferrer()) == 'undef
 }
 
 function submitOpenIDSignin(w) {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.openIDSignin.openid_identifier.value = w();
     document.openIDSignin.action = openauthReferrer();
     document.openIDSignin.submit();
@@ -104,7 +105,8 @@ function withXRDSEndpoint() {
 
 function submitOAuth2Signin(w) {
     parms = w();
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    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];
@@ -125,7 +127,8 @@ function withGithub() {
 
 function submitOAuth1Signin(w) {
     parms = w();
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    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];

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=1154445&r1=1154444&r2=1154445&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 Sat
Aug  6 05:59:04 2011
@@ -32,7 +32,8 @@
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
 function submitSignout() {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     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=1154445&r1=1154444&r2=1154445&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 Sat Aug
 6 05:59:04 2011
@@ -56,7 +56,8 @@ if (typeof(openauthReferrer()) == 'undef
 }
 
 function submitOpenIDSignin(w) {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.openIDSignin.openid_identifier.value = w();
     document.openIDSignin.action = openauthReferrer();
     document.openIDSignin.submit();
@@ -104,7 +105,8 @@ function withXRDSEndpoint() {
 
 function submitOAuth2Signin(w) {
     parms = w();
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    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];
@@ -125,7 +127,8 @@ function withGithub() {
 
 function submitOAuth1Signin(w) {
     parms = w();
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    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];

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=1154445&r1=1154444&r2=1154445&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 Sat Aug
 6 05:59:04 2011
@@ -32,7 +32,8 @@
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
 function submitSignout() {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.signout.submit();
     return true;
 }

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=1154445&r1=1154444&r2=1154445&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 Sat Aug  6 05:59:04
2011
@@ -56,7 +56,8 @@ if (typeof(openauthReferrer()) == 'undef
 }
 
 function submitOpenIDSignin(w) {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.openIDSignin.openid_identifier.value = w();
     document.openIDSignin.action = openauthReferrer();
     document.openIDSignin.submit();
@@ -104,7 +105,8 @@ function withXRDSEndpoint() {
 
 function submitOAuth2Signin(w) {
     parms = w();
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    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];
@@ -125,7 +127,8 @@ function withGithub() {
 
 function submitOAuth1Signin(w) {
     parms = w();
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    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];

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=1154445&r1=1154444&r2=1154445&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 Sat Aug  6 05:59:04
2011
@@ -32,7 +32,8 @@
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
 function submitSignout() {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     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=1154445&r1=1154444&r2=1154445&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 Sat Aug  6 05:59:04
2011
@@ -31,7 +31,8 @@
 
 <script type="text/javascript">
 function submitFormSignin() {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     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=1154445&r1=1154444&r2=1154445&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 Sat Aug  6 05:59:04
2011
@@ -32,7 +32,8 @@
 <form name="signout" action="/login" method="GET">
 <script type="text/javascript">
 function submitSignout() {
-    document.cookie = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() +
';path=/;secure=TRUE';
+    var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.'
+ domainname(window.location.hostname) + ';path=/;secure=TRUE';
+    document.cookie = reset;
     document.signout.submit();
     return true;
 }



Mime
View raw message