Apache-AuthCAS
view release on metacpan or search on metacpan
lib/Apache/AuthCAS.pm view on Meta::CPAN
Apache->warn("$$: CAS: this_url_encoded()") unless ($LOG_LEVEL < $LOG_DEBUG);
my $url = $self->this_url($r);
return $self->urlEncode($url);
}
1;
__END__
=head1 NAME
Apache::AuthCAS - A configurable Apache authentication module that enables you
to protect content on an Apache server using an existing Yale CAS
authentication server.
=head1 SYNOPSIS
C<perl -MCPAN -e 'install Apache::AuthCAS'>
=head1 DESCRIPTION
=head2 General
This module should be loaded in the mod_perl startup script or equivalent.
Add the following lines to an Apache configuration file or .htaccess file:
AuthType Apache::AuthCAS
AuthName "CAS"
PerlAuthenHandler Apache::AuthCAS->authenticate
require valid-user
*note* - this simple config assumes that custom settings are configured
into the module itself. If not, they will need to be specified
with PerlSetVar params (see below for examples).
You can configure this module by placing the devel/production settings in the
module itself. This is particular handy if you would like to make
authentication with this module available via .htaccess to users whom you would
rather not share the database username/password with.
Any options that are not set in the Apache configuration will default to the
values preconfigured in the Apache::AuthCAS module. Either explicitly override
those options that do not match your environment or set them in the module
itself.
The I<Apache::AuthCAS> module allows a user to protect their non-Java content
on an Apache server with the Yale CAS authentication server.
=head2 Requirements
Perl modules:
Net::SSLeay
MIME::Base64
DBI
DBD::<module name> (i.e. DBD::Pg)
=head2 Proxiable Credentials
This module can be optionally configured to use proxy credentials. This is
enabled by setting the I<CASService> and I<CASProxyService> configuration
parameters.
=head2 Examples
Example configuration without proxiable credentials, which assumes that the
module itself has been configured with devel and production variables set:
AuthType Apache::AuthCAS
AuthName "CAS"
PerlAuthenHandler Apache::AuthCAS->authenticate
PerlSetVar CASProduction "1"
require valid-user
Example configuration without proxiable credentials, which has not been
modified:
AuthType Apache::AuthCAS
AuthName "CAS"
PerlAuthenHandler Apache::AuthCAS->authenticate
PerlSetVar CASHost "auth.somedomain.com"
PerlSetVar CASPort "443"
PerlSetVar CASErrorURL "https://somedomain.com/cas/error/"
PerlSetVar CASDatabaseName "cas"
PerlSetVar CASDatabaseHost "db.somedomain.com"
PerlSetVar CASDatabasePort "5432"
PerlSetVar CASDatabaseDriver "Pg"
PerlSetVar CASDatabaseUser "dbuser"
PerlSetVar CASDatabasePass "dbpass"
PerlSetVar CASSessionCookieName "APACHECAS"
PerlSetVar CASSessionTimeout "1800"
PerlSetVar CASLogLevel "0"
PerlSetVar CASRemoveTicket "false"
require valid-user
Example configuration with proxiable credentials, which assumes that the module
itself has been configured with devel and production variables set:
AuthType Apache::AuthCAS
AuthName "CAS"
PerlAuthenHandler Apache::AuthCAS->authenticate
PerlSetVar CASProduction "1"
PerlSetVar CASService "https://somedomain.com/email/"
PerlSetVar CASProxyService "mail.somedomain.com"
require valid-user
Example configuration with proxiable credentials, which has not been modified:
AuthType Apache::AuthCAS
AuthName "CAS"
PerlAuthenHandler Apache::AuthCAS->authenticate
PerlSetVar CASService "https://somedomain.com/email/"
PerlSetVar CASProxyService "mail.somedomain.com"
PerlSetVar CASNumProxyTickets "1"
PerlSetVar CASHost "auth.somedomain.com"
PerlSetVar CASPort "443"
PerlSetVar CASErrorURL "https://somedomain.com/cas/error/"
PerlSetVar CASDatabaseName "cas"
PerlSetVar CASDatabaseHost "db.somedomain.com"
PerlSetVar CASDatabasePort "5432"
PerlSetVar CASDatabaseDriver "Pg"
PerlSetVar CASDatabaseUser "dbuser"
PerlSetVar CASDatabasePass "dbpass"
PerlSetVar CASSessionCookieName "APACHECAS"
PerlSetVar CASSessionTimeout "1800"
PerlSetVar CASLogLevel "0"
PerlSetVar CASRemoveTicket "false"
require valid-user
=head2 Configuration Options
These are Apache configuration option examples for Apache::AuthCAS
# the host name of the CAS server
PerlSetVar CASHost "auth.somedomain.com"
# the port number for the CAS server
PerlSetVar CASPort "443"
# are we running with production config or dev config
PerlSetVar CASProduction "1"
# the URL a client is redirected to after logging in
PerlSetVar CASService "https://somedomain.com/email/"
# the service proxy tickets will be granted for
PerlSetVar CASProxyService "mail.somedomain.com"
# number of proxy tickets to give the underlying application
PerlSetVar CASNumProxyTickets "2"
# the URL the client is redirected to when an error occurs
PerlSetVar CASErrorURL "https://somedomain.com/error/"
# the name of the DBI database driver
PerlSetVar CASDatabaseDriver "Pg"
# the host name of the database server
PerlSetVar CASDatabaseHost "db.somedomain.com"
# the port number of the database server
PerlSetVar CASDatabasePort "5433"
# the name of the database for sessions/pgtiou mapping
PerlSetVar CASDatabaseName "cas"
( run in 1.114 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )