Hi all. I am relatively new to mod_perl so try to bear with me. I am trying to use
the AuthAny.pm module to provide some basic authentication. First off.. Do I put it in
the same directory as Registry.pm? That is where I have it now. In my httpd.conf file
I put the following in:
AuthName Test
AuthType Basic
PerlAuthenHandler AuthAny
require valid-user
I am running on a cobalt raq 3. Here is what I have in AuthAny.pm:
package Apache::AuthAny;
# file: Apache/AuthAny.pm
use strict;
use Apache::Constants qw(:common);
sub handler {
my $r = shift;
my($res, $sent_pw) = $r->get_basic_auth_pw;
return $res if $res != OK;
my $user = $r->connection->user;
unless($user and $sent_pw) {
$r->note_basic_auth_failure;
$r->log_reason("Both a username and password must be provided", $r->filename);
return AUTH_REQUIRED;
}
return OK;
}
1;
__END__
The error log message is:
[Wed Jul 11 09:04:59 2001] [error] (2)No such file or directory: access to /tools/
failed for nr2-216-196-142-76.fuse.net, reason: User not known to the underlying
authentication module
Am I missing something here? I am using the standard apache that came with the raq.
Thanks for any help!
Justin
==
Justin Rains
WSI.com Consulting
http://www.wsicnslt.com/
_
Buy gift certificates online @ http://gc.portalplanet.com/