From 54b61a4f65fb36be0bc3f190707aac2c4226a4a9 Mon Sep 17 00:00:00 2001
From: jsdelfino
Date: Mon, 2 Apr 2012 06:23:35 +0000
Subject: Support multiple Auth modules in a single server or proxy config.
Minor fixes to the OAuth2 module to comply with the spec.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1308244 13f79535-47bb-0310-9956-ffa450edef68
---
sca-cpp/trunk/hosting/server/htdocs/app/index.html | 6 +-
sca-cpp/trunk/hosting/server/htdocs/index.html | 10 +-
.../trunk/hosting/server/htdocs/login/index.html | 83 +++++++++-----
.../server/htdocs/public/notauth/index.html | 5 +-
.../server/htdocs/public/notfound/index.html | 5 +-
.../hosting/server/htdocs/public/notyet/index.html | 5 +-
.../hosting/server/htdocs/public/oops/index.html | 5 +-
sca-cpp/trunk/hosting/server/ssl-start | 52 ++++-----
sca-cpp/trunk/modules/http/basic-auth-conf | 7 +-
sca-cpp/trunk/modules/http/form-auth-conf | 6 +-
sca-cpp/trunk/modules/http/htdocs/login/index.html | 3 +-
.../trunk/modules/http/htdocs/logout/index.html | 3 +-
sca-cpp/trunk/modules/http/http.hpp | 82 +++++++++-----
sca-cpp/trunk/modules/http/httpd-conf | 40 +++++--
sca-cpp/trunk/modules/http/httpd-ssl-conf | 1 +
sca-cpp/trunk/modules/http/httpd.hpp | 18 +--
sca-cpp/trunk/modules/http/mod-openauth.cpp | 28 ++---
sca-cpp/trunk/modules/http/open-auth-conf | 21 +++-
sca-cpp/trunk/modules/http/openauth.hpp | 14 +--
sca-cpp/trunk/modules/http/proxy-conf | 20 ++++
sca-cpp/trunk/modules/http/proxy-ssl-conf | 12 +-
sca-cpp/trunk/modules/js/htdocs/ui.js | 7 --
sca-cpp/trunk/modules/js/htdocs/util.js | 22 ++++
.../trunk/modules/oauth/htdocs/login/index.html | 70 +++++++-----
.../trunk/modules/oauth/htdocs/login/mixed.html | 76 +++++++------
.../trunk/modules/oauth/htdocs/logout/index.html | 11 +-
sca-cpp/trunk/modules/oauth/mod-oauth1.cpp | 87 +++++++--------
sca-cpp/trunk/modules/oauth/mod-oauth2.cpp | 123 ++++++++++++---------
sca-cpp/trunk/modules/oauth/start-mixed-test | 25 +++--
sca-cpp/trunk/modules/oauth/start-test | 21 ++--
.../trunk/modules/openid/htdocs/login/index.html | 11 +-
.../trunk/modules/openid/htdocs/logout/index.html | 11 +-
sca-cpp/trunk/modules/openid/openid-conf | 2 +-
sca-cpp/trunk/modules/openid/start-test | 6 +-
.../domains/jane/htdocs/login/index.html | 69 ++++++------
.../domains/jane/htdocs/logout/index.html | 3 +-
.../domains/joe/htdocs/login/index.html | 69 ++++++------
.../domains/joe/htdocs/logout/index.html | 6 +-
.../samples/store-cluster/htdocs/login/index.html | 69 ++++++------
.../samples/store-cluster/htdocs/logout/index.html | 3 +-
.../samples/store-python/htdocs/login/index.html | 3 +-
.../samples/store-python/htdocs/logout/index.html | 3 +-
42 files changed, 670 insertions(+), 453 deletions(-)
(limited to 'sca-cpp')
diff --git a/sca-cpp/trunk/hosting/server/htdocs/app/index.html b/sca-cpp/trunk/hosting/server/htdocs/app/index.html
index 0b01c1d3bd..19fa7488a5 100644
--- a/sca-cpp/trunk/hosting/server/htdocs/app/index.html
+++ b/sca-cpp/trunk/hosting/server/htdocs/app/index.html
@@ -74,8 +74,12 @@ appcache.get = function(uri) {
document.head.appendChild(ui.declareCSS(appcache.get('/ui-min.css')));
})();
+
+
+
diff --git a/sca-cpp/trunk/hosting/server/htdocs/index.html b/sca-cpp/trunk/hosting/server/htdocs/index.html
index 3bc1529dbb..468461cedc 100644
--- a/sca-cpp/trunk/hosting/server/htdocs/index.html
+++ b/sca-cpp/trunk/hosting/server/htdocs/index.html
@@ -74,8 +74,11 @@ appcache.get = function(uri) {
document.head.appendChild(ui.declareCSS(appcache.get('/ui-min.css')));
})();
+
+
@@ -260,7 +263,7 @@ function showmenu(mdiv, view, appname) {
ui.menu(isNil(config.compose)? 'Composition' : config.compose, '/#view=graph&app=' + appname, '_view', view == 'graph'))),
mklist(
ui.menu('Account', '/#view=account', '_view', view == 'account'),
- ui.signedin()? ui.menufunc('Sign out', 'logout();', false) : ui.menu('Sign in', '/login/', '_self', false)));
+ hasauthcookie()? ui.menufunc('Sign out', 'logout();', false) : ui.menu('Sign in', '/login/', '_self', false)));
}
/**
@@ -434,8 +437,7 @@ window.onloginredirect = function(e) {
*/
function logout() {
// Clear session cookie and user-specific local storage entries
- var reset = 'TuscanyOpenAuth=; expires=' + new Date(1970,01,01).toGMTString() + '; domain=.' + domainname(window.location.hostname) + '; path=/';
- document.cookie = reset;
+ clearauthcookie();
localStorage.removeItem('/r/EditWidget/accounts');
localStorage.removeItem('/r/EditWidget/dashboards');
//localStorage.clear();
diff --git a/sca-cpp/trunk/hosting/server/htdocs/login/index.html b/sca-cpp/trunk/hosting/server/htdocs/login/index.html
index 9052abe8d3..359afc1807 100644
--- a/sca-cpp/trunk/hosting/server/htdocs/login/index.html
+++ b/sca-cpp/trunk/hosting/server/htdocs/login/index.html
@@ -32,31 +32,50 @@
Sign in
-
-
+
+
+
+
+
+
-
@@ -189,20 +190,22 @@ function withTwitter() {