File Coverage

blib/lib/Apache2/AuthAny/AuthenHandler.pm
Criterion Covered Total %
statement 7 9 77.7
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 12 83.3


line stmt bran cond sub pod time code
1             package Apache2::AuthAny::AuthenHandler;
2              
3 1     1   1808 use strict;
  1         3  
  1         48  
4              
5 1     1   6 use Data::Dumper qw(Dumper);
  1         2  
  1         57  
6              
7 1     1   407 use Apache2::Const -compile => qw(OK);
  0            
  0            
8             use Apache2::AuthAny::AuthUtil ();
9             our $aaDB;
10             our $VERSION = '0.201';
11              
12             sub handler {
13             my $r = shift;
14              
15             $r->log->info("Apache2::AuthAny::AuthenHandler: authenticating '" . $r->uri . "'");
16             $r->log->info("Apache2::AuthAny::AuthenHandler: \$ENV{REMOTE_USER}: '" . $ENV{REMOTE_USER} . "'");
17             if ($ENV{REMOTE_USER}) {
18             return Apache2::Const::OK; # Continue through to Authz if handler registered
19             } else {
20             return Apache2::AuthAny::AuthUtil::goToGATE($r, 'first_access');
21             }
22             }
23              
24             1;
25