RolesFor/Auth.pm untested

filter: Statementstmt 0.0% 0 / 5 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 6 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 package OpusVL::AppKit::RolesFor::Auth;
2  
3 use Moose::Role;
4  
5 requires 'check_password';
6  
7 1;
8  
9 __END__
10  
11 =pod
12  
13 =encoding UTF-8
14  
15 =head1 NAME
16  
17 OpusVL::AppKit::RolesFor::Auth
18  
19 =head1 VERSION
20  
21 version 1
22  
23 =head1 SYNOPSIS
24  
25 package FailLogin;
26 use Moose;
27 with 'OpusVL::AppKit::RolesFor::Auth';
28  
29 sub check_password
30 {
31 my ($self, $user, $password) = @_;
32 return 0;
33 }
34  
35 =head1 DESCRIPTION
36  
37 This role is used to supply a method for authenticating a users password.
38  
39 =head1 NAME
40  
41 OpusVL::AppKit::RolesFor::Auth
42  
43 =head1 METHODS
44  
45 =head2 check_password
46  
47 The role expects the classes that support it to implement the check_password method
48 which should take a username and password and return 0 or 1 depending on whether the
49 password is correct.
50  
51 $obj->check_password('user', 'password'); # return 0 or 1
52  
53 =head1 SEE ALSO
54  
55 See L<OpusVL::AppKit::LDAPAuth> for an example of this role in use.
56  
57 =head1 AUTHOR
58  
59 Colin Newell <colin@opusvl.com>
60  
61 =head1 COPYRIGHT AND LICENSE
62  
63 This software is copyright (c) 2016 by OpusVL.
64  
65 This is free software; you can redistribute it and/or modify it under
66 the same terms as the Perl 5 programming language system itself.
67  
68 =cut