line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Auth::Kokolores::Plugin::DumpRequest; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
719
|
use Moose; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# ABSTRACT: kokolores plugin for debugging |
6
|
|
|
|
|
|
|
our $VERSION = '1.01'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
extends 'Auth::Kokolores::Plugin'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'success' => ( is => 'rw', isa => 'Int', default => 0); |
12
|
|
|
|
|
|
|
has 'hide_server_obj' => ( is => 'rw', isa => 'Int', default => 1); |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
4443
|
use Data::Dumper; |
|
1
|
|
|
|
|
4288
|
|
|
1
|
|
|
|
|
181
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub authenticate { |
17
|
0
|
|
|
0
|
0
|
|
my ( $self, $r ) = @_; |
18
|
0
|
|
|
|
|
|
my $sort_keys_backup; |
19
|
|
|
|
|
|
|
|
20
|
0
|
0
|
|
|
|
|
if( $self->hide_server_obj ) { |
21
|
0
|
|
|
|
|
|
$sort_keys_backup = $Data::Dumper::Sortkeys; |
22
|
|
|
|
|
|
|
$Data::Dumper::Sortkeys = sub { |
23
|
0
|
|
|
0
|
|
|
my ($hash) = @_; |
24
|
0
|
|
|
|
|
|
return [ grep { $_ ne 'server' } keys %$hash ]; |
|
0
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
$r->log(4, 'request data: '.Dumper($r) ); |
29
|
|
|
|
|
|
|
|
30
|
0
|
0
|
|
|
|
|
if( $self->hide_server_obj ) { |
31
|
0
|
|
|
|
|
|
$Data::Dumper::Sortkeys = $sort_keys_backup; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return $self->success; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=pod |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=encoding UTF-8 |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 NAME |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Auth::Kokolores::Plugin::DumpRequest - kokolores plugin for debugging |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 VERSION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
version 1.01 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 DESCRIPTION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This plugin dumps the requests data to the debug log. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 USAGE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
<Plugin debug> |
60
|
|
|
|
|
|
|
module="DumpRequest" |
61
|
|
|
|
|
|
|
success=1 |
62
|
|
|
|
|
|
|
</Plugin> |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 PARAMETERS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 success (default:0) |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
When set to 0 returns failure, if set to 1 returns success. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHOR |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Markus Benning <ich@markusbenning.de> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This software is Copyright (c) 2016 by Markus Benning <ich@markusbenning.de>. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This is free software, licensed under: |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
The GNU General Public License, Version 2, June 1991 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |