Apache-AuthCASSimple

 view release on metacpan or  search on metacpan

AuthCASSimple.xs  view on Meta::CPAN

};
static mod_perl_cmd_info cmd_info_CASServerNoSSL = { 
"Apache::AuthCASSimple::CASServerNoSSL", "", 
};
static mod_perl_cmd_info cmd_info_CASCaFile = { 
"Apache::AuthCASSimple::CASCaFile", "", 
};
static mod_perl_cmd_info cmd_info_CASSessionDirectory = { 
"Apache::AuthCASSimple::CASSessionDirectory", "", 
};
static mod_perl_cmd_info cmd_info_CASSessionTimeout = { 
"Apache::AuthCASSimple::CASSessionTimeout", "", 
};
static mod_perl_cmd_info cmd_info_NOModProxy = { 
"Apache::AuthCASSimple::NOModProxy", "", 
};
static mod_perl_cmd_info cmd_info_CASFixDirectory = { 
"Apache::AuthCASSimple::CASFixDirectory", "", 
};


static command_rec mod_cmds[] = {

AuthCASSimple.xs  view on Meta::CPAN

      OR_AUTHCFG, NO_ARGS, "Disable SSL transaction (HTTPS) with the CAS server" },

    { "CASCaFile", perl_cmd_perl_TAKE1,
      (void*)&cmd_info_CASCaFile,
      OR_AUTHCFG, TAKE1, "Location of the CAS server public key" },

    { "CASSessionDirectory", perl_cmd_perl_TAKE1,
      (void*)&cmd_info_CASSessionDirectory,
      OR_AUTHCFG, TAKE1, "Directory where session data are stored" },

    { "CASSessionTimeout", perl_cmd_perl_TAKE1,
      (void*)&cmd_info_CASSessionTimeout,
      OR_AUTHCFG, TAKE1, "Timeout (in second) for session create by Apache::AuthCASSimple" },

    { "NOModProxy", perl_cmd_perl_TAKE1,
      (void*)&cmd_info_NOModProxy,
      OR_AUTHCFG, TAKE1, "Apache mod_perl don't be use with mod_proxy. Default is off." },
	  
    { "CASFixDirectory", perl_cmd_perl_TAKE1,
      (void*)&cmd_info_CASFixDirectory,
      OR_AUTHCFG, TAKE1, "Force the path for the session cookie for same policy for all subdirectories" },

    { NULL }

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/Apache/AuthCASSimple.pm  view on Meta::CPAN

# CASServerNoSSL()
#
# Callback for CASServerNoSSL apache directive
#
sub CASServerNoSSL ($$) {
  shift->{_cas_ssl} = 0;
}


#
# CASSessionTimeout()
#
# Callback for CASSessionTimeout apache directive
#
sub CASSessionTimeout ($$$) {
  my ($cfg, $parms, $arg) = @_;

  die "Invalid CAS session timeout $arg." unless ($arg =~ m/^-?\d+$/);

  $cfg->{_cas_session_timeout} = $arg;
}

#
# CASSessionDirectory()
#
# Callback for CASSessionTimeout apache directive
#
sub CASSessionDirectory ($$$) {
  my ($cfg, $parms, $arg) = @_;

  die "Invalid CAS session directory $arg (does not exist or is not writable)." unless (-d $arg && -w $arg);

  $cfg->{_cas_session_dir} = $arg;
}

#

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

=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

lib/Apache/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 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

Directory where session data are stored. Default is /tmp.

=item CASFixDirectory



( run in 0.293 second using v1.01-cache-2.11-cpan-a5abf4f5562 )