Apache2-AuthenNIS
view release on metacpan or search on metacpan
DESCRIPTION
This perl module is designed to work with mod_perl2 and the Net::NIS
module by Rik Haris (rik.harris@fulcrum.com.au). Version 0.13 of
Apache::AuthenNIS was renamed and modified to use mod_perl2. That
module was a direct adaptation of Michael Parker's
(parker@austx.tandem.com) Apache::AuthenSmb module.
The module uses Net::NIS::yp_match to retrieve the "passwd" entry from
the passwd.byname map, using the supplied username as the search key.
It then uses crypt() to verify that the supplied password matches the
retrieved hashed password.
Parameters
PerlSetVar AllowAlternateAuth
This attribute allows you to set an alternative method of
authentication (Basically, this allows you to mix authentication
methods, if you don't have all users in the NIS database). It does
this by returning a DECLINE and checking for the next handler,
which could be another authentication, such as Apache-AuthenNTLM or
basic authentication.
lib/Apache2/AuthenNIS.pm view on Meta::CPAN
=head1 DESCRIPTION
This perl module is designed to work with mod_perl2 and the Net::NIS
module by Rik Haris (B<rik.harris@fulcrum.com.au>). Version 0.13 of
Apache::AuthenNIS was renamed and modified to use mod_perl2. That module
was a direct adaptation of Michael Parker's (B<parker@austx.tandem.com>)
Apache::AuthenSmb module.
The module uses Net::NIS::yp_match to retrieve the "passwd" entry from the
passwd.byname map, using the supplied username as the search key. It then
uses crypt() to verify that the supplied password matches the retrieved
hashed password.
=head2 Parameters
=over 4
=item PerlSetVar AllowAlternateAuth
This attribute allows you to set an alternative method of authentication
(Basically, this allows you to mix authentication methods, if you don't have
lib/Apache2/AuthenNIS.pm view on Meta::CPAN
my( $user, $hash, $uid, $gid, $gecos, $dir, $shell ) = split( /:/, $entry );
if ( crypt( $sent_pwd, $hash ) eq $hash ) {
return Apache2::Const::OK;
} else {
if ( lc( $allowaltauth ) eq "yes" ) {
return Apache2::Const::DECLINED;
}
else {
$r->note_basic_auth_failure;
$r->log_error( __PACKAGE__, " - user $name: bad password", $r->uri );
return Apache2::Const::HTTP_UNAUTHORIZED;
}
}
return Apache2::Const::OK;
}
=back
( run in 3.311 seconds using v1.01-cache-2.11-cpan-49f99fa48dc )