File Coverage

blib/lib/Authen/SASL/Perl/ANONYMOUS.pm
Criterion Covered Total %
statement 12 13 92.3
branch n/a
condition n/a
subroutine 7 7 100.0
pod 0 3 0.0
total 19 23 82.6


line stmt bran cond sub pod time code
1             # Copyright (c) 2002 Graham Barr <gbarr@pobox.com>. All rights reserved.
2             # This program is free software; you can redistribute it and/or
3             # modify it under the same terms as Perl itself.
4              
5             package Authen::SASL::Perl::ANONYMOUS;
6              
7 2     2   28 use strict;
  2         45  
  2         30  
8 2     2   76 use vars qw($VERSION @ISA);
  2         17  
  2         30  
9              
10             $VERSION = "1.03";
11             @ISA = qw(Authen::SASL::Perl);
12              
13             my %secflags = (
14             noplaintext => 1,
15             );
16              
17 42     42   850 sub _order { 0 }
18             sub _secflags {
19 16     16   186   shift;
20 16         235   grep { $secflags{$_} } @_;
  0         0  
21             }
22              
23 2     2 0 26 sub mechanism { 'ANONYMOUS' }
24              
25             sub client_start {
26 1     1 0 18   shift->_call('authname')
27             }
28              
29             sub client_step {
30 1     1 0 13   shift->_call('authname')
31             }
32              
33             1;
34              
35             __END__
36            
37             =head1 NAME
38            
39             Authen::SASL::Perl::ANONYMOUS - Anonymous Authentication class
40            
41             =head1 SYNOPSIS
42            
43             use Authen::SASL qw(Perl);
44            
45             $sasl = Authen::SASL->new(
46             mechanism => 'ANONYMOUS',
47             callback => {
48             authname => $mailaddress
49             },
50             );
51            
52             =head1 DESCRIPTION
53            
54             This method implements the client part of the ANONYMOUS SASL algorithm,
55             as described in RFC 2245 resp. in IETF Draft draft-ietf-sasl-anon-03.txt
56             from February 2004.
57            
58             =head2 CALLBACK
59            
60             The callbacks used are:
61            
62             =over 4
63            
64             =item authname
65            
66             email address or UTF-8 encoded string to be used as
67             trace information for the server
68            
69             =back
70            
71             =head1 SEE ALSO
72            
73             L<Authen::SASL>,
74             L<Authen::SASL::Perl>
75            
76             =head1 AUTHORS
77            
78             Software written by Graham Barr <gbarr@pobox.com>,
79             documentation written by Peter Marschall <peter@adpm.de>.
80            
81             Please report any bugs, or post any suggestions, to the perl-ldap mailing list
82             <perl-ldap@perl.org>
83            
84             =head1 COPYRIGHT
85            
86             Copyright (c) 2002-2004 Graham Barr.
87             All rights reserved. This program is free software; you can redistribute
88             it and/or modify it under the same terms as Perl itself.
89            
90             Documentation Copyright (c) 2004 Peter Marschall.
91             All rights reserved. This documentation is distributed,
92             and may be redistributed, under the same terms as Perl itself.
93            
94             =cut
95