CGI-Bus

 view release on metacpan or  search on metacpan

lib/CGI/Bus/uauth.pod  view on Meta::CPAN

=head1 NAME

CGI::Bus::uauth - default or base user authentication class


=head1 SYNOPSIS

 use CGI::Bus;
 $s =CGI::Bus->new();
 $s->ugroups;         # get groups current user belongs to

 use CGI::Bus;
 $s =CGI::Bus->new();
 $s->set(-login => '/cgi-bin/login-screen.cgi');
 $s->uauth;           # go to login screen

 use CGI::Bus;
 $s =CGI::Bus->new();
 $s->set(-login => undef);
 $s->uauth->authscr   # login script under web server authentication

 use CGI::Bus;
 $s =CGI::Bus->new();
 $s->uauth->loginscr; # ... with authentication by application


=head1 DESCRIPTION

This is default or base user authentication class.
It provides C<user>, C<ugroups>, C<uglist>, C<auth> methods
for L<CGI::Bus|CGI/Bus> 'user' and 'group' methods, which are
wrappers to C<CGI::Bus::uauth>.
It contains platform specific methods and may be overwritten 
in L<CGI::Bus|CGI/Bus> with '-import'.
It implements a three user authentication methods:

Web server user authentication on Win32 IIS or Apache with 'NTLM' module.
Win32 operation use 
Windows 2000 ADSI via L<Win32::OLE|Win32/OLE> module
or 'findgrp.exe' Windows NT Resource Kit utility
or L<Win32API::Net|Win32API/Net> module.

Apache user authentication with 'AuthUserFile' and 'AuthGroupFile'.
Apache itself may use 'uagroup' buffer file produced from Windows 2000 ADSI within C<dpath>.

User authentication by application (with C<loginscr> or C<auth>/C<authscr>), 
where user data are stored within
L<CGI::Bus::udata|CGI/Bus/udata> or its replacement.


Cookie operation (C<auth>, C<loginscr>, C<signchk>, C<signset>, C<logout>) 
use L<Digest|Digest> modules, default is 'MD5'.


Microsoft IIS deimpersonation requires L<Win32::API|Win32/API> for 'RevertToSelf' call.


See L<CGI::Bus::Base|CGI/Bus/Base> for inherited slots and methods.




=head1 SLOTS

=over


=item -AuthUserFile

Pointer to Apache's 'AuthUserFile'


=item -AuthGroupFile

Pointer to Apache's 'AuthGroupFile'


=item -digest

L<Digest|Digest> submodule to use with C<signchk> and C<signset>.
Default used is 'MD5'


=item -login

Login screen URL. Used by C<auth>


=item -udata

If true, user authentication by application will be supposed
with L<CGI::Bus::udata|CGI/Bus/udata> component for
C<ugroups> and C<uglist> calls


=back

=head1 METHODS


=over


=item auth (?[types], ?redirect URL) 

User authentication request or login operation.
Redirect to C<-login> and exit may be used for authentication.
Login screen should set $ENV{REMOTE_USER} (by web server or itself)
and call C<auth>; C<signset>(?redirect) will be called inside.
This operation is for optional web server authentication.
It is not needed when web server authentication is set for scripts.



( run in 0.752 second using v1.01-cache-2.11-cpan-39bf76dae61 )