CGI-AppBuilder-Login
view release on metacpan or search on metacpan
display user first name if it is 'login'
Variables used or routines called:
None.
How to use:
my $q = new CGI;
my %cfg = (usr=>'jsmith', pwd=>'jojo');
my @names = $q->param;
foreach my $k (@names) { $cfg{$k} = $q->param($k) if ! exists $cfg{$k}; }
$self->get_version($q, \%cfg);
Return: $t - HTML code
This method forms HTML code to show demorgraphic information about the
subject.
check_timeout($cgi, $ar)
Input variables:
$cgi - CGI object
$ar - Array ref containing all the parameters
Variables used or routines called:
None.
How to use:
my $q = new CGI;
my %cfg = (usr=>'jsmith', pwd=>'jojo');
my @names = $q->param;
foreach my $k (@names) { $cfg{$k} = $q->param($k) if ! exists $cfg{$k}; }
$self->check_timeout($q, \%cfg);
Return: 1 or 0: 1 - timed out; 0 - not timed out
This method checks to see if the session has been timed out. The default
time out is 20 minutes.
get_access ($cgi,$ar)
Input variables:
$cgi - CGI object
$ar - Array ref containing all the parameters
Variables used or routines called:
None
How to use:
my $q = new CGI;
my %cfg = (usr=>'jsmith', pwd=>'jojo');
my @names = $q->param;
foreach my $k (@names) { $cfg{$k} = $q->param($k) if ! exists $cfg{$k}; }
$self->get_access($q, \%cfg);
Return: $hr - access hash array ref: ${$hr}{uid|gid}{$name} = $uid|$giu
This method retrieves portal access user and group files and
access_users and access_groups in the configuration file to build an
access list.
check_user ($cgi,$ar)
Input variables:
$cgi - CGI object
$ar - Array ref containing all the parameters
Variables used or routines called:
disp_param - display parameters
get_cookies - get cookies
get_access - get access information
How to use:
my $q = new CGI;
my %cfg = (usr=>'jsmith', pwd=>'jojo');
my @names = $q->param;
foreach my $k (@names) { $cfg{$k} = $q->param($k) if ! exists $cfg{$k}; }
$self->check_user($q, \%cfg);
Return: $n - status code
0 - no user name from input nor from cookie
1 - user name does not exists
2 - user does not belong to any group which has granted access
>9 - user has access to the application
A successful user authentication includes: 1) the user has to be a valid
web portal user; 2) user's password matches 3) user has to be a
authorized user or in an authorized group to use this application. The
autorization parameters are access_users and access_groups in the
configuration file.
( run in 1.253 second using v1.01-cache-2.11-cpan-97f6503c9c8 )