view release on metacpan or search on metacpan
bin/auth-any-user.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use Apache2::AuthAny::DB ();
use Getopt::Long;
use Data::Dumper qw(Dumper);
my $usage = "Usage: auth-any-user.pl [options] user\n" .
"Use 'auth-any-user.pl --help' for complete documentation\n";
my $full_usage = <<'USAGE';
Usage: auth-any-user.pl [options] user
Options:
--help Print this documentation
bin/clean-cookie-table.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use Apache2::AuthAny::DB ();
use Data::Dumper qw(Dumper);
my $db = Apache2::AuthAny::DB->new();
$db->cleanupCookies();
lib/Apache2/AuthAny.pm view on Meta::CPAN
package Apache2::AuthAny;
use strict;
use Data::Dumper qw(Dumper);
use Apache2::Module ();
use Apache2::ServerUtil ();
use Apache2::Const -compile => qw(OR_AUTHCFG TAKE1 TAKE2 OR_ALL FLAG ITERATE :log);
=head1 NAME
Apache2::AuthAny - Authentication with any provider or mechanism
=head1 VERSION
lib/Apache2/AuthAny/AuthUtil.pm view on Meta::CPAN
package Apache2::AuthAny::AuthUtil;
use strict;
use URI::Escape;
use Data::Dumper;
use Apache2::Const -compile => qw(OK DECLINED HTTP_UNAUTHORIZED REDIRECT);
use CGI::Cookie ();
use Apache2::AuthAny::DB ();
our $aaDB;
our $VERSION = '0.201';
sub goToGATE {
my $r = shift;
my $reason = shift;
my $subReason = shift;
my $request = uri_escape($r->unparsed_uri);
# prevent redirect loops
$request =~ s/aalogin/aadisabled/g;
my $dumped_subReason = $subReason ? ", subReason => " . Data::Dumper::Dumper($subReason) : '';
$r->log->info("Apache2::AuthAny::AuthUtil: Going to gate with request => '$request'" .
"reason => '$reason' $dumped_subReason" );
my $cf = Apache2::Module::get_config('Apache2::AuthAny', $r->server, $r->per_dir_config) || {};
my $gateURL = $cf->{AuthAnyGateURL};
my $gate = "$gateURL?req=$request";
if ($reason) {
$gate .= "&reason=$reason";
lib/Apache2/AuthAny/AuthenHandler.pm view on Meta::CPAN
package Apache2::AuthAny::AuthenHandler;
use strict;
use Data::Dumper qw(Dumper);
use Apache2::Const -compile => qw(OK);
use Apache2::AuthAny::AuthUtil ();
our $aaDB;
our $VERSION = '0.201';
sub handler {
my $r = shift;
$r->log->info("Apache2::AuthAny::AuthenHandler: authenticating '" . $r->uri . "'");
lib/Apache2/AuthAny/AuthzHandler.pm view on Meta::CPAN
package Apache2::AuthAny::AuthzHandler;
use strict;
use Apache2::Const -compile => qw(OK DECLINED HTTP_UNAUTHORIZED);
use Data::Dumper qw(Dumper);
use Apache2::AuthAny::DB qw();
our $VERSION = '0.201';
sub handler {
my $r = shift;
my $cf = Apache2::Module::get_config('Apache2::AuthAny',
$r->server,
$r->per_dir_config) || {};
lib/Apache2/AuthAny/Cookie.pm view on Meta::CPAN
use strict;
use CGI::Cookie ();
use Apache2::Cookie ();
use Apache2::Request ();
use Digest::MD5 qw(md5_hex);
use Apache2::AuthAny::DB ();
use Apache2::AuthAny::AuthUtil ();
use Data::Dumper qw(Dumper);
use Apache2::Const -compile => qw(HTTP_UNAUTHORIZED REDIRECT OK);
our $aaDB;
our $VERSION = '0.201';
sub post_login {
my $r = shift;
my $uri = $r->uri;
my ($authProvider) = ($uri =~ m{/aa_auth/(.*?)/});
lib/Apache2/AuthAny/DB.pm view on Meta::CPAN
package Apache2::AuthAny::DB;
use strict;
use DBI;
use Data::Dumper;
use Digest::MD5 qw(md5_hex);
my $dbHandle;
our $VERSION = '0.201';
sub new {
my $class = shift;
my $self = {};
unless ($dbHandle) {
lib/Apache2/AuthAny/FixupHandler.pm view on Meta::CPAN
package Apache2::AuthAny::FixupHandler;
use strict;
use Apache2::Const -compile => qw(OK DECLINED HTTP_UNAUTHORIZED);
use Data::Dumper qw(Dumper);
use Apache2::AuthAny::DB qw();
our $aaDB;
our $VERSION = '0.201';
sub handler {
my $r = shift;
if (!$ENV{AA_SCRIPTED} && $ENV{AA_STATE} eq 'authenticated') {
# not already timed out
my $pid = $r->pnotes('pid');
$aaDB = Apache2::AuthAny::DB->new() unless $aaDB;
lib/Apache2/AuthAny/RequestConfig.pm view on Meta::CPAN
use strict;
use Apache2::Module ();
use Apache2::Access ();
use Apache2::Request ();
use URI::Escape;
use Digest::MD5 qw(md5_hex);
use MIME::Base64;
use Apache2::Const -compile => qw(OK DECLINED REDIRECT HTTP_UNAUTHORIZED);
use Data::Dumper("Dumper");
use CGI;
use CGI::Cookie;
use Apache2::AuthAny::Cookie ();
use Apache2::AuthAny::DB ();
use Apache2::AuthAny::AuthUtil ();
our $aaDB;
our $VERSION = '0.201';
my @system_skip_auth = qw(/Shibboleth);