summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/openid/openid-conf
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-08-02 01:42:59 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-08-02 01:42:59 +0000
commit91bee1de5ab7b97cc32c8ba1c9942823757b86a6 (patch)
tree87610c1667e6768af15d21299d168d130e590f98 /sca-cpp/trunk/modules/openid/openid-conf
parentb85cc12a996022a40e1a3cec0caf6cd432a49f1e (diff)
Fix HTTPS config scripts to enable SSL certicates, HTTP basic auth, and OpenID to coexist. Add OpenID support to sample.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@981352 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/openid/openid-conf')
-rwxr-xr-xsca-cpp/trunk/modules/openid/openid-conf28
1 files changed, 21 insertions, 7 deletions
diff --git a/sca-cpp/trunk/modules/openid/openid-conf b/sca-cpp/trunk/modules/openid/openid-conf
index 206281db38..19d7d06d99 100755
--- a/sca-cpp/trunk/modules/openid/openid-conf
+++ b/sca-cpp/trunk/modules/openid/openid-conf
@@ -20,32 +20,46 @@
# Generate an OpenID server conf
here=`readlink -f $0`; here=`dirname $here`
root=`readlink -f $1`
-openid_prefix=`cat openid.prefix`
+conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
+host=`echo $conf | awk '{ print $6 }'`
+openid_prefix=`cat $here/openid.prefix`
# Configure HTTPD mod_auth_openid module
cat >>$root/conf/httpd.conf <<EOF
# Generated by: openid-conf $*
-# Support for OpenID authentication
+# Load support for OpenID authentication
LoadModule authopenid_module $openid_prefix/modules/mod_auth_openid.so
+# Enable OpenID authentication
<Location />
+AuthType OpenID
AuthOpenIDEnabled On
AuthOpenIDCookiePath /
AuthOpenIDLoginPage /login
AuthOpenIDAXAdd EMAIL http://axschema.org/contact/email
</Location>
-<Location /unprotected>
-AuthOpenIDEnabled Off
-</Location>
-
+# Enable unauthenticated access to unprotected areas
<Location /login>
AuthOpenIDEnabled Off
</Location>
-
<Location /logout>
AuthOpenIDEnabled Off
</Location>
+<Location /unprotected>
+AuthOpenIDEnabled Off
+</Location>
+
+EOF
+
+cat >>$root/conf/vhost-ssl.conf <<EOF
+# Generated by: openid-conf $*
+# Require OpenID authentication
+<Location />
+AuthType OpenID
+AuthName "$host"
+Require valid-user
+</Location>
EOF