diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-02-20 07:20:15 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-02-20 07:20:15 +0000 |
commit | 8fdc6a6dc4b2b23b923d8cbfba5190933155e95d (patch) | |
tree | 2d446c4c3f20ce56d2669ffc29d07c17a4e96ed2 /sca-cpp/trunk/modules/oauth/oauth-conf | |
parent | 08adcf2e783e4733e0fd646d353db3592c62140d (diff) |
Refactor auth configuration to allow HTTP and HTTPS virtual hosts to use different auth mechanisms, and refactor log configuration to make it easier to use.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1291133 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/oauth/oauth-conf')
-rwxr-xr-x | sca-cpp/trunk/modules/oauth/oauth-conf | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sca-cpp/trunk/modules/oauth/oauth-conf b/sca-cpp/trunk/modules/oauth/oauth-conf index 23ec52b35f..0b8f14b636 100755 --- a/sca-cpp/trunk/modules/oauth/oauth-conf +++ b/sca-cpp/trunk/modules/oauth/oauth-conf @@ -32,6 +32,13 @@ fi conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` +sslconf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-ssl-conf"` +if [ "$sslconf" = "" ]; then + sslsuffix="" +else + sslsuffix="-ssl" +fi + # Configure HTTPD mod_tuscany_oauth module cat >>$root/conf/modules.conf <<EOF # Generated by: oauth-conf $* @@ -42,14 +49,14 @@ LoadModule mod_tuscany_oauth2 $here/libmod_tuscany_oauth2$libsuffix EOF # Disallow public access to server resources -cat >$root/conf/noauth.conf <<EOF +cat >$root/conf/noauth$sslsuffix.conf <<EOF # Generated by: oauth-auth-conf $* # Disallow public access to server resources EOF # Configure OAuth authentication -cat >>$root/conf/auth.conf <<EOF +cat >>$root/conf/locauth$sslsuffix.conf <<EOF # Generated by: oauth-conf $* # Enable OAuth authentication <Location /> @@ -74,6 +81,9 @@ AddAuthOAuth1ScopeAttr FIRSTNAME first-name AddAuthOAuth1ScopeAttr LASTNAME last-name </Location> +EOF + +cat >>$root/conf/auth.conf <<EOF # Configure OAuth App keys Include $root/cert/oauth-keys.conf |