Apache2-AuthCAS
view release on metacpan or search on metacpan
lib/Apache2/AuthCAS.pm view on Meta::CPAN
CASHost "auth.yourdomain.com"
CASErrorURL "https://yourdomain.com/cas/error/"
CASDbDriver "Oracle
CASDbDataSource "sid=yourdb;host=dbhost.yourdomain.com;port=1521"
CASDbUser "cas_user"
CASDbPass "cas_pass"
CASDbSessionTable "cas_sessions_service1"
Example configuration with proxiable credentials:
AuthType Apache2::AuthCAS
AuthName "CAS"
PerlAuthenHandler Apache2::AuthCAS->authenticate
require valid-user
CASService "https://yourdomain.com/email/"
CASProxyService "mail.yourdomain.com"
Example configuration with proxiable credentials, using custom database parameters:
AuthType Apache2::AuthCAS
AuthName "CAS"
PerlAuthenHandler Apache2::AuthCAS->authenticate
require valid-user
CASService "https://yourdomain.com/email/"
CASProxyService "mail.yourdomain.com"
CASDbDriver "Oracle
CASDbDataSource "sid=yourdb;host=dbhost.yourdomain.com;port=1521"
CASDbUser "cas_user"
CASDbPass "cas_pass"
CASDbSessionTable "cas_sessions_service1"
=head2 Configuration Options
These are the Apache configuration options, defaults, and descriptions
for Apache2::AuthCAS.
# The CAS server parameters. These should be self explanatory.
CASHost "localhost"
CASPort "443"
CASLoginUri "/cas/login"
CASLogoutUri "/cas/logout"
CASProxyUri "/cas/proxy"
CASProxyValidateUri "/cas/proxyValidate"
CASServiceValidateUri "/cas/serviceValidate"
# The level of logging, ERROR(0) - EMERG(4)
CASLogLevel 0
# Should we set the 'Basic' authentication header?
CASPretendBasicAuth 0
# Where do we redirect if there is an error?
CASErrorUrl "http://localhost/cas/error/"
# Session cleanup threshold (1 in N requests)
# Session cleanup will occur for each Apache thread or process -
# i.e. for 10 processes, it may take as many as 100 requests before
# session cleanup is performed with a threshold of 10)
CASSessionCleanupThreshold 10
# Session cookie configuration for this service
CASSessionCookieDomain ""
CASSessionCookieName "APACHECAS"
CASSessionTimeout 1800
# Should the ticket parameter be removed from the URL?
CASRemoveTicket 0
# Optional override for this service name
CASService ""
# If you are proxying for a backend service you will need to specify
# these parameters. The service is the name of the backend service
# you are proxying for, the receptor is the URL you will listen at
# for pgtiou/pgt mappings from the CAS server, and the final parameter
# specifies how many proxy tickets should be requested for the backend
# service.
CASProxyService ""
CASNumProxyTickets 0
# Database parameters for session and ticket management
CASDbDriver "Pg"
CASDbDataSource "dbname=apache_cas;host=localhost;port=5432"
CASDbSessionTable "cas_sessions"
CASDbUser "cas"
CASDbPass "cas"
=head1 NOTES
Configuration
Any options that are not set in the Apache configuration will default to the
values preconfigured in the Apache2::AuthCAS module. You should explicitly
override those options that do not match your environment.
Database
If you installed this module via CPAN shell, cpan2rpm, or some other automated installer, don't forget to create the session table!
The SQL-92 format of the table is:
CREATE TABLE cas_sessions (
id varchar(32) not null primary key,
last_accessed int8 not null,
user_id varchar(32) not null,
pgtiou varchar(256),
pgt varchar(256)
service_ticket varchar(256)
);
Add indexes and adjust as appropriate for your database and usage.
SSL
Be careful not to use the CASSessionCookieSecure flag with an HTTP resource.
If this flag is set and the protocol is HTTP, then no cookie will get sent
to Apache and Apache2::AuthCAS may act very strange.
( run in 1.727 second using v1.01-cache-2.11-cpan-c966e8aa7e8 )