Apache-AuthCAS
view release on metacpan or search on metacpan
lib/Apache/AuthCAS.pm view on Meta::CPAN
my $DEVEL_DB_SESSION_TABLE = "cas_sessions";
my $PROD_DB_SESSION_TABLE = "cas_sessions";
# the name of the pgtiou to pgt mapping table
my $DB_PGTIOU_TABLE = "";
my $DEVEL_DB_PGTIOU_TABLE = "cas_pgtiou_to_pgt";
my $PROD_DB_PGTIOU_TABLE = "cas_pgtiou_to_pgt";
# the user to connnect to the database with
my $DB_USER = "";
my $DEVEL_DB_USER = "develuser";
my $PROD_DB_USER = "produser";
# the password to connect to the databse with
my $DB_PASS = "";
my $DEVEL_DB_PASS = "develpass";
my $PROD_DB_PASS = "prodpass";
# whether or not we want redirect magic to remove service ticket from URL
my $DEFAULT_REMOVE_TICKET = "0";
my $REMOVE_TICKET = $DEFAULT_REMOVE_TICKET;
# are we running with production config, or other?
my $PRODUCTION = "0";
# 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
lib/Apache/AuthCAS.pm view on Meta::CPAN
} elsif ($PRODUCTION) {
$DB_USER = $PROD_DB_USER;
Apache->warn("$$: CAS: initialize(): setting database user to $DB_USER") unless ($LOG_LEVEL < $LOG_INFO);
} else {
# default
$DB_USER = $DEVEL_DB_USER;
Apache->warn("$$: CAS: initialize(): setting database user to $DB_USER") unless ($LOG_LEVEL < $LOG_INFO);
}
if ($tmp = $r->dir_config("CASDatabasePass")) {
$DB_PASS = $tmp;
Apache->warn("$$: CAS: initialize(): setting database password to $DB_PASS") unless ($LOG_LEVEL < $LOG_INFO);
} elsif ($PRODUCTION) {
$DB_PASS = $PROD_DB_PASS;
Apache->warn("$$: CAS: initialize(): setting database password to $DB_PASS") unless ($LOG_LEVEL < $LOG_INFO);
} else {
# default
$DB_PASS = $DEVEL_DB_PASS;
Apache->warn("$$: CAS: initialize(): setting database password to $DB_PASS") unless ($LOG_LEVEL < $LOG_INFO);
}
if (!$DB_HOST or !$DB_PORT or !$DB_NAME or !$DB_USER or !$DB_PASS) {
Apache->warn("$$: CAS: initialize(): database not properly configured. Please specify: 'CASDatabaseHost', 'CASDatabasePort', 'CASDatabaseName', 'CASDatabaseUser', 'CASDatabasePassword'");
}
if ($tmp = $r->dir_config("CASRemoveTicket")) {
$REMOVE_TICKET = $tmp;
Apache->warn("$$: CAS: initialize(): setting CASRemoveTicket to $REMOVE_TICKET") unless ($LOG_LEVEL < $LOG_INFO);
} else {
lib/Apache/AuthCAS.pm view on Meta::CPAN
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
lib/Apache/AuthCAS.pm view on Meta::CPAN
# the port number of the database server
PerlSetVar CASDatabasePort "5433"
# the name of the database for sessions/pgtiou mapping
PerlSetVar CASDatabaseName "cas"
# the user to connnect to the database with
PerlSetVar CASDatabaseUser "dbuser"
# the password to connect to the databse with
PerlSetVar CASDatabasePass "dbpass"
# the name of the session table
PerlSetVar CASDatabaseSessionTable "cas_sessions"
# the name of the pgtiou to pgt mapping table
PerlSetVar CASDatabasePGTIOUTable "cas_pgtiou_to_pgt"
# the level of logging
PerlSetVar CASLogLevel "4"
( run in 1.143 second using v1.01-cache-2.11-cpan-49f99fa48dc )