From 5cc3ef4b5260a20ce28c3ada0d7edb364ca1688b Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 9 Apr 2012 06:22:06 +0000 Subject: Enable administrative access using basic auth. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1311136 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/oauth/mod-oauth2.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sca-cpp/trunk/modules/oauth/mod-oauth2.cpp') diff --git a/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp b/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp index dbede7ed8b..05ad77d646 100644 --- a/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp +++ b/sca-cpp/trunk/modules/oauth/mod-oauth2.cpp @@ -308,7 +308,10 @@ static int checkAuthn(request_rec *r) { return httpd::reportStatus(accessToken(httpd::queryArgs(r), r, sc.appkeys, sc.cs, sc.mc)); } - // Redirect to the login page, unless we have a session id from another module + // Redirect to the login page, unless we have a session id or an authorization + // header from another module + if (apr_table_get(r->headers_in, (PROXYREQ_PROXY == r->proxyreq) ? "Proxy-Authorization" : "Authorization") != NULL) + return DECLINED; if (hasContent(openauth::sessionID(r, "TuscanyOpenIDAuth")) || hasContent(openauth::sessionID(r, "TuscanyOpenAuth")) || hasContent(openauth::sessionID(r, "TuscanyOAuth1"))) -- cgit v1.2.3