line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Auth::ActiveDirectory::User; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
951
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
60
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
956
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Auth::ActiveDirectory::User - Authentication module for MS ActiveDirectory |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 0.02 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Quick summary of what the module does. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=cut |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head2 new |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Constructor |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub new { |
33
|
4
|
|
|
4
|
1
|
87
|
my $class = shift; |
34
|
4
|
|
|
|
|
27
|
my $self = {@_}; |
35
|
4
|
|
|
|
|
8
|
bless $self, $class; |
36
|
4
|
|
|
|
|
40
|
return $self; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 firstname |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Getter/Setter for internal hash key firstname. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub firstname { |
46
|
3
|
100
|
|
3
|
1
|
28
|
return $_[0]->{firstname} unless $_[1]; |
47
|
1
|
|
|
|
|
2
|
$_[0]->{firstname} = $_[1]; |
48
|
1
|
|
|
|
|
5
|
return $_[0]->{firstname}; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 groups |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Getter/Setter for internal hash key groups. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub groups { |
58
|
4
|
100
|
|
4
|
1
|
28
|
return $_[0]->{groups} unless $_[1]; |
59
|
1
|
|
|
|
|
3
|
$_[0]->{groups} = $_[1]; |
60
|
1
|
|
|
|
|
7
|
return $_[0]->{groups}; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 surname |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Getter/Setter for internal hash key surname. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=cut |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub surname { |
70
|
3
|
100
|
|
3
|
1
|
18
|
return $_[0]->{surname} unless $_[1]; |
71
|
1
|
|
|
|
|
4
|
$_[0]->{surname} = $_[1]; |
72
|
1
|
|
|
|
|
5
|
return $_[0]->{surname}; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 uid |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Getter/Setter for internal hash key uid. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=cut |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub uid { |
82
|
3
|
100
|
|
3
|
1
|
458
|
return $_[0]->{uid} unless $_[1]; |
83
|
1
|
|
|
|
|
3
|
$_[0]->{uid} = $_[1]; |
84
|
1
|
|
|
|
|
3
|
return $_[0]->{uid}; |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 user |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Getter/Setter for internal hash key user. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=cut |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub user { |
94
|
2
|
100
|
|
2
|
1
|
10
|
return $_[0]->{user} unless $_[1]; |
95
|
1
|
|
|
|
|
3
|
$_[0]->{user} = $_[1]; |
96
|
1
|
|
|
|
|
4
|
return $_[0]->{user}; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 display_name |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Getter/Setter for internal hash key display_name. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
sub display_name { |
106
|
3
|
100
|
|
3
|
1
|
26
|
return $_[0]->{display_name} unless $_[1]; |
107
|
1
|
|
|
|
|
51
|
$_[0]->{display_name} = $_[1]; |
108
|
1
|
|
|
|
|
6
|
return $_[0]->{display_name}; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head2 mail |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Getter/Setter for internal hash key mail. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=cut |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
sub mail { |
118
|
3
|
100
|
|
3
|
1
|
21
|
return $_[0]->{mail} unless $_[1]; |
119
|
1
|
|
|
|
|
3
|
$_[0]->{mail} = $_[1]; |
120
|
1
|
|
|
|
|
3
|
return $_[0]->{mail}; |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head2 last_password_set |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Getter/Setter for internal hash key last_password_set. |
126
|
|
|
|
|
|
|
Timestamp is converted to unix timestamp, there's no reason to use these |
127
|
|
|
|
|
|
|
strange AD timestamp. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=cut |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
sub last_password_set { |
132
|
3
|
100
|
|
3
|
1
|
21
|
return $_[0]->{last_password_set} unless $_[1]; |
133
|
1
|
|
|
|
|
2
|
$_[0]->{last_password_set} = $_[1]; |
134
|
1
|
|
|
|
|
4
|
return $_[0]->{last_password_set}; |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head2 account_expires |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
Getter/Setter for internal hash key last_password_set. |
140
|
|
|
|
|
|
|
Timestamp is converted to unix timestamp, there's no reason to use these |
141
|
|
|
|
|
|
|
strange AD timestamp. |
142
|
|
|
|
|
|
|
undef means account never expires |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=cut |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
sub account_expires { |
147
|
3
|
100
|
|
3
|
1
|
22
|
return $_[0]->{account_expires} unless $_[1]; |
148
|
1
|
|
|
|
|
3
|
$_[0]->{account_expires} = $_[1]; |
149
|
1
|
|
|
|
|
3
|
return $_[0]->{account_expires}; |
150
|
|
|
|
|
|
|
} |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
1; # End of uth::ActiveDirectory::User |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
__END__ |