line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- perl -*- |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Authen::PAAS::BasicUser by Daniel Berrange |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Copyright (C) 2004-2006 Dan Berrange |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify |
8
|
|
|
|
|
|
|
# it under the terms of the GNU General Public License as published by |
9
|
|
|
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or |
10
|
|
|
|
|
|
|
# (at your option) any later version. |
11
|
|
|
|
|
|
|
# |
12
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful, |
13
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15
|
|
|
|
|
|
|
# GNU General Public License for more details. |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License |
18
|
|
|
|
|
|
|
# along with this program; if not, write to the Free Software |
19
|
|
|
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20
|
|
|
|
|
|
|
# |
21
|
|
|
|
|
|
|
# $Id: BasicUser.pm,v 1.1 2005/08/21 07:39:37 dan Exp $ |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=pod |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Authen::PAAS::BasicUser - a simple user principal |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
use Authen::PAAS::BasicUser; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $principal = Authen::PAAS::BasicUser->new("joeblogs"); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 DESCRIPTION |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
This module provides a representation of the simple virtual user |
38
|
|
|
|
|
|
|
principal created by the L module |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 METHODS |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=over 4 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
package Authen::PAAS::BasicUser; |
47
|
|
|
|
|
|
|
|
48
|
1
|
|
|
1
|
|
7
|
use base qw(Authen::PAAS::Principal); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
632
|
|
49
|
|
|
|
|
|
|
|
50
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
51
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
91
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
our $VERSION = '1.0.0'; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item my $principal = Authen::PAAS::BasicUser->new($username); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Creates a new basic user, with the name given by the C<$username> |
58
|
|
|
|
|
|
|
parameter. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub new { |
63
|
2
|
|
|
2
|
1
|
12
|
my $proto = shift; |
64
|
2
|
|
33
|
|
|
12
|
my $class = ref($proto) || $proto; |
65
|
2
|
|
|
|
|
17
|
my $self = $class->SUPER::new(name => shift); |
66
|
|
|
|
|
|
|
|
67
|
2
|
|
|
|
|
6
|
bless $self, $class; |
68
|
|
|
|
|
|
|
|
69
|
2
|
|
|
|
|
10
|
return $self; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
1 # So that the require or use succeeds. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
__END__ |