line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyrights 2012 by [Mark Overmeer]. |
2
|
|
|
|
|
|
|
# For other contributors see ChangeLog. |
3
|
|
|
|
|
|
|
# See the manual pages for details on the licensing terms. |
4
|
|
|
|
|
|
|
# Pod stripped from pm file by OODoc 2.00. |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
1176
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
35
|
|
7
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package Mozilla::Persona::Validate::IMAPTalk; |
10
|
1
|
|
|
1
|
|
6
|
use vars '$VERSION'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
11
|
|
|
|
|
|
|
$VERSION = '0.12'; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
6
|
use base 'Mozilla::Persona::Validate'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
104
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
5
|
use Log::Report qw/persona/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
16
|
1
|
|
|
1
|
|
332
|
use Mail::IMAPTalk (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
293
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub init($) |
20
|
0
|
|
|
0
|
0
|
|
{ my ($self, $args) = @_; |
21
|
0
|
0
|
|
|
|
|
$self->{MPVI_server} = $args->{server} or panic; |
22
|
0
|
|
|
|
|
|
$self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
#------------ |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub server() {shift->{MPVI_server}} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub isValid($$) |
30
|
0
|
|
|
0
|
1
|
|
{ my ($self, $user, $password) = @_; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
my $imap = Mail::IMAPTalk->new |
33
|
|
|
|
|
|
|
( Server => $self->server |
34
|
|
|
|
|
|
|
, Username => $user |
35
|
|
|
|
|
|
|
, Password => $password |
36
|
|
|
|
|
|
|
, Uid => 1 |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
|
39
|
0
|
0
|
|
|
|
|
$imap or return 0; |
40
|
0
|
|
|
|
|
|
$imap->logout; |
41
|
0
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |