line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Google::Calendar::Server::Auth::Dummy; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2632
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
53
|
|
4
|
1
|
|
|
1
|
|
7
|
use base qw(Net::Google::Calendar::Server::Auth); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1038
|
|
5
|
1
|
|
|
1
|
|
6
|
use Digest::MD5 qw(md5_hex); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
653
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Net::Google::Calendar::Server::Auth::Dummy - the most basic authentication module for Net::Google::Calendar::Server |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 METHODS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head2 validate |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Return a validation token. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub validate { |
22
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
23
|
0
|
|
|
|
|
|
my $email = shift; |
24
|
0
|
|
|
|
|
|
my $pass = shift; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
return md5_hex("$email:$pass"); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 auth |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Return 1 if the authetication key is correct. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub auth { |
37
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
38
|
0
|
|
|
|
|
|
my $key = shift; |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
return 1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 magic_cookie_auth |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Return 1 if the email and magic cookie auth are correct. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub magic_cookie_auth { |
51
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
52
|
0
|
|
|
|
|
|
my $email = shift; |
53
|
0
|
|
|
|
|
|
my $cookie = shift; |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
return 1; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |