Apache-AuthCAS
view release on metacpan or search on metacpan
lib/Apache/AuthCAS.pm view on Meta::CPAN
112113114115116117118119120121122123124125126127128129130131132my
$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
375376377378379380381382383384385386387388389390391392393394395396397398399400401402}
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
147414751476147714781479148014811482148314841485148614871488148914901491149214931494
PerlAuthenHandler Apache::AuthCAS->authenticate
*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
160616071608160916101611161216131614161516161617161816191620162116221623162416251626# 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.859 second using v1.01-cache-2.11-cpan-87723dcf8b7 )