diff options
Diffstat (limited to 'sca-cpp/trunk/modules/openid/openid-conf')
-rwxr-xr-x | sca-cpp/trunk/modules/openid/openid-conf | 28 |
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 |