summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/oauth/oauth-conf
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/oauth/oauth-conf')
-rwxr-xr-xsca-cpp/trunk/modules/oauth/oauth-conf20
1 files changed, 11 insertions, 9 deletions
diff --git a/sca-cpp/trunk/modules/oauth/oauth-conf b/sca-cpp/trunk/modules/oauth/oauth-conf
index 0b8f14b636..26e654036b 100755
--- a/sca-cpp/trunk/modules/oauth/oauth-conf
+++ b/sca-cpp/trunk/modules/oauth/oauth-conf
@@ -39,18 +39,23 @@ else
sslsuffix="-ssl"
fi
+if [ "$2" = "" ]; then
+ providers="file"
+else
+ providers="$2 file"
+fi
+
# Configure HTTPD mod_tuscany_oauth module
cat >>$root/conf/modules.conf <<EOF
# Generated by: oauth-conf $*
# Load support for OAuth authentication
-LoadModule mod_tuscany_oauth1 $here/libmod_tuscany_oauth1$libsuffix
LoadModule mod_tuscany_oauth2 $here/libmod_tuscany_oauth2$libsuffix
EOF
# Disallow public access to server resources
cat >$root/conf/noauth$sslsuffix.conf <<EOF
-# Generated by: oauth-auth-conf $*
+# Generated by: oauth-conf $*
# Disallow public access to server resources
EOF
@@ -62,9 +67,12 @@ cat >>$root/conf/locauth$sslsuffix.conf <<EOF
<Location />
AuthType Open
AuthName "$host"
+AuthOAuthProvider socache $providers
+AuthnCacheProvideFor $providers
+AuthnCacheContext /
Require valid-user
AuthOAuth On
-AuthOAuthLoginPage /login
+AuthOAuthLoginPage /login/
AddAuthOAuth2ScopeAttr REALM realm
AddAuthOAuth2ScopeAttr REMOTE_USER email
AddAuthOAuth2ScopeAttr EMAIL email
@@ -72,13 +80,7 @@ AddAuthOAuth2ScopeAttr NICKNAME name
AddAuthOAuth2ScopeAttr FULLNAME name
AddAuthOAuth2ScopeAttr FIRSTNAME first_name
AddAuthOAuth2ScopeAttr LASTNAME last_name
-AddAuthOAuth1ScopeAttr REALM realm
-AddAuthOAuth1ScopeAttr REMOTE_USER email
-AddAuthOAuth1ScopeAttr EMAIL email
-AddAuthOAuth1ScopeAttr NICKNAME screen_name
AddAuthOAuth2ScopeAttr FULLNAME name
-AddAuthOAuth1ScopeAttr FIRSTNAME first-name
-AddAuthOAuth1ScopeAttr LASTNAME last-name
</Location>
EOF