diff options
Diffstat (limited to 'sca-cpp/trunk/modules/oauth')
-rwxr-xr-x | sca-cpp/trunk/modules/oauth/oauth-conf | 14 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/oauth/oauth-memcached-conf | 7 |
2 files changed, 19 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 diff --git a/sca-cpp/trunk/modules/oauth/oauth-memcached-conf b/sca-cpp/trunk/modules/oauth/oauth-memcached-conf index 83477562f8..0f5196b7a5 100755 --- a/sca-cpp/trunk/modules/oauth/oauth-memcached-conf +++ b/sca-cpp/trunk/modules/oauth/oauth-memcached-conf @@ -23,6 +23,13 @@ root=`echo "import os; print os.path.realpath('$1')" | python` host=$2 port=$3 +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 cache cat >>$root/conf/auth.conf <<EOF # Generated by: oauth-memcached-conf $* |