summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/oauth/oauth-conf
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-07-16 06:47:49 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-07-16 06:47:49 +0000
commit11522a4b90a4056319cdbc204fffc63780cbfa51 (patch)
treefde77f10429bc13b042d6ac779f0b89149c8334d /sca-cpp/trunk/modules/oauth/oauth-conf
parentf82576588fc9672a011655e709179eb43e5ab5b4 (diff)
Add an HTTPD auth provider allowing the authentication logic to be implemented by a component, and cleanup the SSL and mod-security config a bit.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1361915 13f79535-47bb-0310-9956-ffa450edef68
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