Apache2-AuthCASSimple
view release on metacpan or search on metacpan
PerlOptions +GlobalRequest
<Location /protected>
AuthType Apache2::AuthCASSimple
PerlAuthenHandler Apache2::AuthCASSimple
PerlSetVar CASServerName my.casserver.com
PerlSetVar CASServerPath /
# PerlSetVar CASServerPort 443
# PerlSetVar CASServerNoSSL 1
PerlSetVar CASSessionTimeout 3660
PerlSetVar CASSessionDirectory /tmp
# PerlSetVar CASFixDirectory /
# PerlSetVar ModProxy 1
# PerlSetVar HTTPSServer 1
require valid-user
</Location>
or
Disable SSL transaction wih CAS server (HTTPS). Default is off.
CASCaFile
CAS server public key. This file is used to allow secure connection
between the webserver using Apache2::AuthCASSimple and the CAS
server.
DEPRECATED : Authen::CAS::Client use LWP::UserAgent to make https
requests
CASSessionTimeout
Timeout (in second) for session create by Apache2::AuthCASSimple (to
avoid CAS server overloading). Default is 60.
-1 means disable.
0 mean infinite (until the user close browser).
CASSessionDirectory
Directory where session data are stored. Default is /tmp.
CASFixDirectory
examples/apache_conf/default view on Meta::CPAN
PerlOptions +GlobalRequest
<Location />
AuthType Apache2::AuthCASSimple
PerlAuthenHandler Apache2::AuthCASSimple
PerlSetVar CASServerName auth.univ.fr
PerlSetVar CASServerPath /
# PerlSetVar CASServerPort 443
# PerlSetVar CASServerNoSSL 1
PerlSetVar CASSessionTimeout 6
PerlSetVar CASSessionDirectory /tmp
# PerlSetVar CASFixDirectory /
# PerlSetVar ModProxy 1
require valid-user
</Location>
# use mason for fun
<Location />
SetHandler perl-script
inc/Module/Install/Fetch.pm view on Meta::CPAN
require Cwd;
my $dir = Cwd::getcwd();
chdir $args{local_dir} or return if exists $args{local_dir};
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
} }
elsif (my $ftp = $self->can_run('ftp')) { eval {
# no Net::FTP, fallback to ftp.exe
require FileHandle;
my $fh = FileHandle->new;
lib/Apache2/AuthCASSimple.pm view on Meta::CPAN
# does it need to do something ?
#return DECLINED unless($r->ap_auth_type() eq __PACKAGE__);
$log->info(__PACKAGE__.": == Entering into authentification process.:" );
$log->info(__PACKAGE__.": == ".$r->method.' '.$r->uri() .' '.$r->args() );
$log->info(__PACKAGE__.": == ".$r->connection->remote_ip() );
# Get module config (Apache Perl SetVAR values)
my $cas_session_timeout = $r->dir_config('CASSessionTimeout') || 60;
my $cas_ssl = $r->dir_config('CASServerNoSSL')?0:1;
my $cas_name = $r->dir_config('CASServerName') || 'my.casserver.com';
my $cas_port = $r->dir_config('CASServerPort') ? ':'.$r->dir_config('CASServerPort') : ':443' ;
$cas_port = '' if ( $cas_port eq ':443' && $cas_ssl );
my $cas_path = $r->dir_config('CASServerPath') || '/' ;
$cas_path = '' if ($cas_path eq '/');
my $mod_proxy = $r->dir_config('ModProxy');
# Check for internal session
my $user;
lib/Apache2/AuthCASSimple.pm view on Meta::CPAN
#
# Retrieve username if a session exist ans is correctly filled
#
sub _get_user_from_session ($) {
my $r = shift;
my $s;
my $mod_proxy = $r->dir_config('ModProxy');
my $cas_session_dir = $r->dir_config('CASSessionDirectory') || '/tmp';
my $cas_cookie_path = $r->dir_config('CASFixDirectory') || '/';
my $cas_session_timeout = $r->dir_config('CASSessionTimeout') || 60;
my $is_https = $r->dir_config('HTTPSServer') || 0;
$r->log()->info(__PACKAGE__.": Checking session.");
eval { $s = Apache::Session::Wrapper->new(
class => 'File',
directory => $cas_session_dir,
lock_directory => $cas_session_dir,
use_cookie => 1,
cookie_secure => $is_https,
lib/Apache2/AuthCASSimple.pm view on Meta::CPAN
PerlOptions +GlobalRequest
<Location /protected>
AuthType Apache2::AuthCASSimple
PerlAuthenHandler Apache2::AuthCASSimple
PerlSetVar CASServerName my.casserver.com
PerlSetVar CASServerPath /
# PerlSetVar CASServerPort 443
# PerlSetVar CASServerNoSSL 1
PerlSetVar CASSessionTimeout 3660
PerlSetVar CASSessionDirectory /tmp
# PerlSetVar CASFixDirectory /
# PerlSetVar ModProxy 1
# PerlSetVar HTTPSServer 1
require valid-user
</Location>
or
lib/Apache2/AuthCASSimple.pm view on Meta::CPAN
Disable SSL transaction wih CAS server (HTTPS). Default is off.
=item CASCaFile
CAS server public key. This file is used to allow secure connection
between the webserver using Apache2::AuthCASSimple and the CAS server.
DEPRECATED : L<Authen::CAS::Client> use L<LWP::UserAgent> to make https requests
=item CASSessionTimeout
Timeout (in second) for session create by Apache2::AuthCASSimple (to avoid CAS server overloading). Default is 60.
-1 means disable.
0 mean infinite (until the user close browser).
=item CASSessionDirectory
Directory where session data are stored. Default is /tmp.
=item CASFixDirectory
( run in 0.246 second using v1.01-cache-2.11-cpan-4d50c553e7e )