Apache-AuthCASSimple
view release on metacpan or search on metacpan
lib/Apache/AuthCASSimple.pm view on Meta::CPAN
my ($cfg, $parms, $arg) = @_;
die "Invalid CAS fix directory directive, path must begin with '/'." unless ($arg && $arg =~ m/^\//);
$cfg->{_cas_cookie_path} = $arg;
}
#
# NOModProxy()
#
# Callback for NOModProxy apache directive
#
sub NOModProxy ($) {
shift->{_mod_proxy} = 0;
}
#
# DIR_CREATE
#
# create default values
#
sub DIR_CREATE {
my $class = shift;
my $self = {};
$self->{_cas_name} = "my.cas-server.net";
$self->{_cas_path} = "/cas";
$self->{_cas_port} = "443";
$self->{_cas_ssl} = 1;
$self->{_cas_cookie_path} = "/";
$self->{_ca_file} = "";
$self->{_cas_session_dir} = "/tmp";
$self->{_cas_session_timeout} = -1;
$self->{_mod_proxy} = 1;
return bless($self, $class);
}
#
# DIR_MERGE
#
# create default values
#
sub DIR_MERGE {
my ($parent, $current) = @_;
my $new = {%$parent, %$current};
return bless($new, ref($parent));
}
1;
__END__
=head1 NAME
Apache::AuthCASSimple - Apache module to authentificate trough a CAS server
=head1 DESCRIPTION
Apache::AuthCASSimple is a module for Apache/mod_perl. It allow you to
authentificate users trough a CAS server. It means you don't need
to give login/password if you've already be authentificate by the CAS
server, only tickets are exchanged between Web client, Apache server
and CAS server. If you not're authentificate yet, you'll be redirect
on the CAS server login form.
=head1 SYNOPSIS
<Location /protected>
AuthType Apache::AuthCASSimple
PerlAuthenHandler Apache::AuthCASSimple
CASServerName my.casserver.com
CASServerPath /
#CASServerPort 443
# CASServerNoSSL
CASSessionTimeout 60
CASSessionDirectory /tmp
# CASFixDirectory /
# NOModProxy
require valid-user
</Location>
or require user xxx yyyy
=head1 CONFIGURATION
=over 4
=item CASServerName
Name of the CAS server. It can be a numeric IP address.
=item CASServerPort
Port of the CAS server. Default is 443.
=item CASServerPath
Path (URI) of the CAS server. Default is "/cas".
=item CASServerNoSSL
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 Apache::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 Apache::AuthCASSimple (to avoid CAS server overloading). Default is -1.
-1 means disable.
0 mean infinite (until the user close browser).
=item CASSessionDirectory
( run in 0.621 second using v1.01-cache-2.11-cpan-39bf76dae61 )