summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/openid/openid-conf
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-07-24 23:21:38 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-07-24 23:21:38 +0000
commit50b290072e213a7aeb62d6bac5ad4b67a6fc42eb (patch)
tree809a05cb56ee40a7f2dbf4973422c0070cd60773 /sca-cpp/trunk/modules/openid/openid-conf
parentfcc191fad24715bf54e8dcd0ea50303161787d0b (diff)
Change OpenID conf to protect the entire tree under a host, and work with OpenID step2 discovery.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@978945 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/openid/openid-conf')
-rwxr-xr-xsca-cpp/trunk/modules/openid/openid-conf38
1 files changed, 15 insertions, 23 deletions
diff --git a/sca-cpp/trunk/modules/openid/openid-conf b/sca-cpp/trunk/modules/openid/openid-conf
index eeae4292b7..b98b4030c4 100755
--- a/sca-cpp/trunk/modules/openid/openid-conf
+++ b/sca-cpp/trunk/modules/openid/openid-conf
@@ -17,49 +17,41 @@
# specific language governing permissions and limitations
# under the License.
-# Generate an Axis2 server conf
+# Generate an OpenID server conf
here=`readlink -f $0`; here=`dirname $here`
root=`readlink -f $1`
-htdocs=`readlink -f $2`
+host=$2
+port=`echo $3 | awk -F "/" '{ print $1 }'`
+pport=`echo $3 | awk -F "/" '{ print $2 }'`
+if [ "$pport" = "" ]; then
+ pport=$port
+fi
+htdocs=`readlink -f $4`
openid_prefix=`cat openid.prefix`
-servername=`cat $root/conf/httpd.conf | grep ServerName | tail -1 | awk '{ print $2 }'`
-
# Configure HTTPD mod_auth_openid module
cat >>$root/conf/httpd.conf <<EOF
# Support for OpenID authentication
LoadModule authopenid_module $openid_prefix/modules/mod_auth_openid.so
-<Location /protected>
-AuthOpenIDEnabled On
-AuthOpenIDCookiePath /
-AuthOpenIDLoginPage /protected/login
-AuthOpenIDAXAdd EMAIL http://axschema.org/contact/email
-AuthOpenIDServerName $servername
-</Location>
-
-<Location /components>
+<Location />
AuthOpenIDEnabled On
AuthOpenIDCookiePath /
-AuthOpenIDLoginPage /protected/login
+AuthOpenIDLoginPage /login
AuthOpenIDAXAdd EMAIL http://axschema.org/contact/email
-AuthOpenIDServerName $servername
</Location>
-<Location /references>
-AuthOpenIDEnabled On
-AuthOpenIDCookiePath /
-AuthOpenIDLoginPage /protected/login
-AuthOpenIDAXAdd EMAIL http://axschema.org/contact/email
-AuthOpenIDServerName $servername
+<Location /unprotected>
+AuthOpenIDEnabled Off
</Location>
-<Location /protected/login>
+<Location /login>
AuthOpenIDEnabled Off
</Location>
-<Location /protected/logout>
+<Location /logout>
AuthOpenIDEnabled Off
</Location>
EOF
+