summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-08-06 05:59:04 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-08-06 05:59:04 +0000
commit96659f703781c4223a9db5013cac10b850daa46b (patch)
treefed109b192a9d4d8c9f1358fd289fff45318f9a8 /sca-cpp/trunk/samples
parent9bc3767bab48bbd5897441a36d90f5b7daa8e321 (diff)
Make authentication work with wildcard domains and increase authentication cookie max-age.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1154445 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/samples')
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html9
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html3
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html9
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html3
-rw-r--r--sca-cpp/trunk/samples/store-cluster/htdocs/login/index.html9
-rw-r--r--sca-cpp/trunk/samples/store-cluster/htdocs/logout/index.html3
-rw-r--r--sca-cpp/trunk/samples/store-python/htdocs/login/index.html3
-rw-r--r--sca-cpp/trunk/samples/store-python/htdocs/logout/index.html3
8 files changed, 28 insertions, 14 deletions
diff --git a/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html b/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html
index 4e3b5a2f61..346e3fcea8 100644
--- a/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html
@@ -56,7 +56,8 @@ if (typeof(openauthReferrer()) == 'undefined') {
}
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];
diff --git a/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html b/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html
index 37c2594ffb..7780e9dec3 100644
--- a/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html
@@ -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;
}
diff --git a/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html b/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html
index 4e3b5a2f61..346e3fcea8 100644
--- a/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html
@@ -56,7 +56,8 @@ if (typeof(openauthReferrer()) == 'undefined') {
}
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];
diff --git a/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html b/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html
index 4a025af225..e16183015f 100644
--- a/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html
@@ -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;
}
diff --git a/sca-cpp/trunk/samples/store-cluster/htdocs/login/index.html b/sca-cpp/trunk/samples/store-cluster/htdocs/login/index.html
index 4e3b5a2f61..346e3fcea8 100644
--- a/sca-cpp/trunk/samples/store-cluster/htdocs/login/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/htdocs/login/index.html
@@ -56,7 +56,8 @@ if (typeof(openauthReferrer()) == 'undefined') {
}
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];
diff --git a/sca-cpp/trunk/samples/store-cluster/htdocs/logout/index.html b/sca-cpp/trunk/samples/store-cluster/htdocs/logout/index.html
index 37c2594ffb..7780e9dec3 100644
--- a/sca-cpp/trunk/samples/store-cluster/htdocs/logout/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/htdocs/logout/index.html
@@ -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;
}
diff --git a/sca-cpp/trunk/samples/store-python/htdocs/login/index.html b/sca-cpp/trunk/samples/store-python/htdocs/login/index.html
index f4bdcd7f42..8b0ad48bd6 100644
--- a/sca-cpp/trunk/samples/store-python/htdocs/login/index.html
+++ b/sca-cpp/trunk/samples/store-python/htdocs/login/index.html
@@ -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();
}
diff --git a/sca-cpp/trunk/samples/store-python/htdocs/logout/index.html b/sca-cpp/trunk/samples/store-python/htdocs/logout/index.html
index 4a025af225..e16183015f 100644
--- a/sca-cpp/trunk/samples/store-python/htdocs/logout/index.html
+++ b/sca-cpp/trunk/samples/store-python/htdocs/logout/index.html
@@ -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;
}