Jifty/Plugin/Authentication/Password.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 26 CC 2 SCAR 12.0
CC
2
Cov
0%
init
6.0
prereq_plugins
2.0
BEGIN
2.0
CRAP 3.3
1 use strict;
2 use warnings;
3  
4 package Jifty::Plugin::Authentication::Password;
5 use base qw/Jifty::Plugin/;
6  
7 __PACKAGE__->mk_accessors(qw(nav_menu signup));
8  
9 Jifty->web->add_javascript(qw/ MD5.js login_hashing.js /);
10  
11 =head1 NAME
12  
13 Jifty::Plugin::Authentication::Password - password authentication plugin
14  
15 =head1 SYNOPSIS
16  
17 # In your jifty config.yml under the framework section:
18  
19 Plugins:
20 - LetMe: {}
21 - User: {}
22 - Authentication::Password:
23 login_by: email
24  
25 # we now support two login_by: email or username
26  
27 =head1 DESCRIPTION
28  
29 B<CAUTION:> This plugin is experimental.
30  
31 This may be combined with the L<Jifty::Plugin::User> and
32 L<Jifty::Plugin::LetMe> plugins to provide user accounts and
33 form-based password authentication to your application.
34  
35 =head2 METHODS
36  
37 =head2 prereq_plugins
38  
39 This plugin depends on the L<User|Jifty::Plugin::User> and L<LetMe|Jifty::Plugin::LetMe> plugins.
40  
41 =cut
42  
43  
44 sub prereq_plugins {
45 return ('User', 'LetMe');
46 }
47  
48 =head2 init
49  
50 =cut
51  
52 sub init {
53 my $self = shift;
54 return if $self->_pre_init;
55  
56 my %opt = (
57 nav_menu => 1,
58 signup => 1,
59 @_
60 );
61  
62 $self->nav_menu( $opt{nav_menu} );
63 $self->signup( $opt{signup} );
64 }
65  
66 =head1 SEE ALSO
67  
68 L<Jifty::Manual::AccessControl>, L<Jifty::Plugin::User>, L<Jifty::Plugin::LetMe>, L<Jifty::Plugin::Authentication::Password::Mixin::Model::User>
69  
70 =head1 LICENSE
71  
72 Jifty is Copyright 2005-2010 Best Practical Solutions, LLC.
73 Jifty is distributed under the same terms as Perl itself.
74  
75 =cut
76  
77 1;