Apache-AuthCAS

 view release on metacpan or  search on metacpan

lib/Apache/AuthCAS.pm  view on Meta::CPAN

112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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

375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
} 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

1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
    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

1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
# 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 )