File Coverage

blib/lib/CGI/Application/Plugin/Authentication/Driver/Dummy.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 16 16 100.0


line stmt bran cond sub pod time code
1             package CGI::Application::Plugin::Authentication::Driver::Dummy;
2             $CGI::Application::Plugin::Authentication::Driver::Dummy::VERSION = '0.21';
3 3     3   910 use strict;
  3         5  
  3         108  
4 3     3   29 use warnings;
  3         4  
  3         104  
5              
6 3     3   13 use base qw(CGI::Application::Plugin::Authentication::Driver);
  3         4  
  3         559  
7              
8             =head1 NAME
9              
10             CGI::Application::Plugin::Authentication::Driver::Dummy - Dummy Authentication driver which
11             lets anyone authenticate regardless of the password they provide
12              
13             =head1 SYNOPSIS
14              
15             use base qw(CGI::Application);
16             use CGI::Application::Plugin::Authentication;
17              
18             __PACKAGE__->authen->config(
19             DRIVER => 'Dummy',
20             );
21              
22             =head1 DESCRIPTION
23              
24             This Driver is the anti-authentication driver, since it doesn't check the
25             credentials at all, and just accepts whatever the user has entered.
26             It can be useful in development, or if you want a guest based system without
27             passwords.
28              
29              
30             =head1 EXAMPLE
31              
32             __PACKAGE__->authen->config(
33             DRIVER => 'Dummy',
34             );
35              
36              
37             =head1 METHODS
38              
39             =head2 verify_credentials
40              
41             This method will automatically return the first credential as the username without checking
42             anything else.
43              
44             =cut
45              
46             sub verify_credentials {
47 4     4 1 4 my $self = shift;
48 4         10 return shift;
49             }
50              
51              
52             =head1 SEE ALSO
53              
54             L, L, perl(1)
55              
56              
57             =head1 LICENCE AND COPYRIGHT
58              
59             Copyright (c) 2005, SiteSuite. All rights reserved.
60              
61             This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
62              
63              
64             =head1 DISCLAIMER OF WARRANTY
65              
66             BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
67              
68             IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
69              
70             =cut
71              
72             1;