From 96659f703781c4223a9db5013cac10b850daa46b Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sat, 6 Aug 2011 05:59:04 +0000 Subject: 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 --- sca-cpp/trunk/modules/oauth/htdocs/login/index.html | 6 ++++-- sca-cpp/trunk/modules/oauth/htdocs/login/mixed.html | 12 ++++++++---- sca-cpp/trunk/modules/oauth/htdocs/logout/index.html | 3 ++- sca-cpp/trunk/modules/oauth/mod-oauth1.cpp | 1 + sca-cpp/trunk/modules/oauth/mod-oauth2.cpp | 3 ++- 5 files changed, 17 insertions(+), 8 deletions(-) (limited to 'sca-cpp/trunk/modules/oauth') diff --git a/sca-cpp/trunk/modules/oauth/htdocs/login/index.html b/sca-cpp/trunk/modules/oauth/htdocs/login/index.html index 5de29ca9da..3805deade3 100644 --- a/sca-cpp/trunk/modules/oauth/htdocs/login/index.html +++ b/sca-cpp/trunk/modules/oauth/htdocs/login/index.html @@ -57,7 +57,8 @@ if (typeof(oauthReferrer()) == 'undefined') { 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]; diff --git a/sca-cpp/trunk/modules/oauth/htdocs/login/mixed.html b/sca-cpp/trunk/modules/oauth/htdocs/login/mixed.html index 59e45b470b..8be8a4deaa 100644 --- a/sca-cpp/trunk/modules/oauth/htdocs/login/mixed.html +++ b/sca-cpp/trunk/modules/oauth/htdocs/login/mixed.html @@ -30,7 +30,8 @@