line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Auth::Kokolores::Plugin::FailDelay; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
742
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# ABSTRACT: kokolores plugin which add a delay on failed authentication |
6
|
|
|
|
|
|
|
our $VERSION = '1.01'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
extends 'Auth::Kokolores::Plugin'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has 'delay' => ( |
11
|
|
|
|
|
|
|
is => 'ro', isa => 'Int', default => 1, |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub post_process { |
15
|
0
|
|
|
0
|
0
|
|
my ( $self, $r, $response ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
0
|
|
|
|
|
if( ! $response->success ) { |
18
|
0
|
|
|
|
|
|
sleep( $self->delay ); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=pod |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=encoding UTF-8 |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Auth::Kokolores::Plugin::FailDelay - kokolores plugin which add a delay on failed authentication |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 VERSION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
version 1.01 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 AUTHOR |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Markus Benning <ich@markusbenning.de> |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This software is Copyright (c) 2016 by Markus Benning <ich@markusbenning.de>. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
This is free software, licensed under: |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
The GNU General Public License, Version 2, June 1991 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |