blib/lib/HTML/FormFu/Validator/OpusVL/AppKit/CurrentPasswordValidator.pm

filter: Statementstmt 100% 14 / 14 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 95.2% 20 / 21 CC 2 SCAR 3.4
CC
2
Cov
100%
validate_value
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« lib/OpusVL/AppKit/Schema/AppKitAuthDB/ResultSet/Aclfeature.pm ↑ Summary blib/lib/OpusVL/AppKit/Builder.pm »
1 package HTML::FormFu::Validator::OpusVL::AppKit::CurrentPasswordValidator;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 ▶use base 'HTML::FormFu::Validator';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub validate_value {
9 2 ▶ my ( $self, $value, $params ) = @_;
Subroutine validate_value: called CC=2 SCAR=6.9
Pod undocumented
10  
11 2 my $c = $self->form->stash->{context};
12  
13 2 ▶ return 1 if($c->authenticate({ username => $c->user->username, password => $value }));
Branch: 1 branch
BranchTrueFalseTotal
if $c->authenticate({"username", $c->user->username, "password", $value}) 1 1 2
14  
15 1 die HTML::FormFu::Exception::Validator->new({
16 message => 'Invalid password',
17 });
18 }
19  
20 4 1;
21  
22 __END__
23  
24 =pod
25  
26 =encoding UTF-8
27  
28 =head1 NAME
29  
30 HTML::FormFu::Validator::OpusVL::AppKit::CurrentPasswordValidator
31  
32 =head1 VERSION
33  
34 version 2.24
35  
36 =head1 AUTHOR
37  
38 OpusVL - www.opusvl.com
39  
40 =head1 COPYRIGHT AND LICENSE
41  
42 This software is copyright (c) 2010 by OpusVL - www.opusvl.com.
43  
44 This is free software; you can redistribute it and/or modify it under
45 the same terms as the Perl 5 programming language system itself.
46  
47 =cut
« lib/OpusVL/AppKit/Schema/AppKitAuthDB/ResultSet/Aclfeature.pm ↑ Summary blib/lib/OpusVL/AppKit/Builder.pm »