line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Apache2::AuthAny::FixupHandler; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2730
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
50
|
|
4
|
1
|
|
|
1
|
|
438
|
use Apache2::Const -compile => qw(OK DECLINED HTTP_UNAUTHORIZED); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Data::Dumper qw(Dumper); |
6
|
|
|
|
|
|
|
use Apache2::AuthAny::DB qw(); |
7
|
|
|
|
|
|
|
our $aaDB; |
8
|
|
|
|
|
|
|
our $VERSION = '0.201'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub handler { |
11
|
|
|
|
|
|
|
my $r = shift; |
12
|
|
|
|
|
|
|
if (!$ENV{AA_SCRIPTED} && $ENV{AA_STATE} eq 'authenticated') { |
13
|
|
|
|
|
|
|
# not already timed out |
14
|
|
|
|
|
|
|
my $pid = $r->pnotes('pid'); |
15
|
|
|
|
|
|
|
$aaDB = Apache2::AuthAny::DB->new() unless $aaDB; |
16
|
|
|
|
|
|
|
$aaDB->updatePCookieLastAccess($pid->{PID}) || warn "Could not update last access"; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
return Apache2::Const::DECLINED; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
###!!!! MOVE THIS TO Cookie.pm |
22
|
|
|
|
|
|
|
# called after basic login |
23
|
|
|
|
|
|
|
sub update_logout_key { |
24
|
|
|
|
|
|
|
my $r = shift; |
25
|
|
|
|
|
|
|
my $pid = $r->pnotes('pid'); |
26
|
|
|
|
|
|
|
$aaDB = Apache2::AuthAny::DB->new() unless $aaDB; |
27
|
|
|
|
|
|
|
$aaDB->updatePCookieLogoutKey($pid->{PID}) || warn "Could not update last access"; |
28
|
|
|
|
|
|
|
return Apache2::Const::DECLINED; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|