Apache-AppSamurai
view release on metacpan or search on metacpan
@extrareq
},
add_to_cleanup => [ 'Apache-AppSamurai-*' ],
recommends => {
'Crypt::OpenSSL::AES' => 0, # Needs one
'Crypt::Twofish' => 0, # good block cipher
'Crypt::Blowfish' => 0, # for Crypt::CBC to
'Crypt::Rijndael' => 0, # use.
'Apache::Test' => 0, # Full tests
'LWP::UserAgent' => 0, # AuthBasic.pm
'HTTP::Request' => 0, # AuthBasic.pm
'Authen::Radius' => 0, # AuthRadius.pm
'Authen::Simple' => 0, # AuthSimple.pm
},
auto_features => {
Apache_Test_support =>
{
description => "Perform full Apache::Test testing",
requires => { 'Apache::Test' => 0},
},
YAML_support =>
URI: 0
mod_perl: 1.07
recommends:
Apache::Test: 0
Authen::Radius: 0
Authen::Simple: 0
Crypt::Blowfish: 0
Crypt::OpenSSL::AES: 0
Crypt::Rijndael: 0
Crypt::Twofish: 0
HTTP::Request: 0
LWP::UserAgent: 0
provides:
Apache::AppSamurai:
file: lib/Apache/AppSamurai.pm
version: 1.01
Apache::AppSamurai::AuthBase:
file: lib/Apache/AppSamurai/AuthBase.pm
version: 1.15
Apache::AppSamurai::AuthBasic:
file: lib/Apache/AppSamurai/AuthBasic.pm
lib/Apache/AppSamurai/AuthBasic.pm view on Meta::CPAN
use vars qw($VERSION @ISA);
$VERSION = substr(q$Revision: 1.18 $, 10, -1);
use Carp;
use Apache::AppSamurai::AuthBase;
# Below is used to make client connection to backend server to test auth
# and collect any cookies we want to keep
use LWP::UserAgent;
use HTTP::Request;
use MIME::Base64;
@ISA = qw( Apache::AppSamurai::AuthBase );
sub Configure {
my $self = shift;
# Pull defaults from AuthBase and save.
$self->SUPER::Configure();
my $conft = $self->{conf};
lib/Apache/AppSamurai/AuthBasic.pm view on Meta::CPAN
sub Initialize {
my $self = shift;
# Holding space for alterlist items
$self->{alterlist} = {};
# Create LWP client and empty request
$self->{client} = new LWP::UserAgent(timeout => $self->{conf}{Timeout});
($self->{client}) || ($self->AddError("Initialization of LWP::UserAgent failed: $!") && return 0);
$self->{request} = new HTTP::Request("GET", $self->{conf}{LoginUrl});
($self->{request}) || ($self->AddError("Initialization of HTTP::Request failed: $!") && return 0);
# Turn off all redirects if configured
($self->{conf}{AllowRedirect} == 1) || ($self->{client}->requests_redirectable([]));
# Set the User-Agent for the request (You may want to use
# "HEADER:User-Agent" as the value in your Apache config. AppSamurai.pm
# will fill in the client's User-Agent: header value per-request, then.)
($self->{conf}{UserAgent} eq '') || ($self->{request}->header('User-Agent' => $self->{conf}{UserAgent}));
$self->{init} = 1;
lib/Apache/AppSamurai/AuthBasic.pm view on Meta::CPAN
rules. (See L<Apache::AppSamurai|Apache::AppSamurai> for alterlist
information.)
=item *
Creates a L<LWP::UserAgent|LWP::UserAgent> instance and saves it in
C<< $self->{client} >>.
=item *
Creates a L<HTTP::Request|HTTP::Request> instance, containing the auth
server URL, and saves it in C<< $self->{request} >>.
=item *
If C<UserAgent> is set, collects (if C<header:> is used), then sets the
C<User-Agent> header in the request.
=back
=head2 Authenticator()
lib/Apache/AppSamurai/AuthBasic.pm view on Meta::CPAN
=back
=head1 EXAMPLES
See L</SYNOPSIS> for a basic example, or configuration examples in
F<examples/conf/> inside the Apache::AppSamurai distribution.
=head1 SEE ALSO
L<Apache::AppSamurai>, L<Apache::AppSamurai::AuthBase>, L<LWP::UserAgent>,
L<HTTP::Request>
=head1 AUTHOR
Paul M. Hirsch, C<< <paul at voltagenoir.org> >>
=head1 BUGS
See L<Apache::AppSamurai> for information on bug submission and tracking.
=head1 SUPPORT
( run in 0.838 second using v1.01-cache-2.11-cpan-de7293f3b23 )