Cristóvão Dalla Costa wrote:
> Hi
>
> I'd like to do basic www authentication on my scripts. Apache::Auth::DBI
> isn't good since it would waste a database connection, and just add
> unnecessary complication. I'd like to do something like:
>
> if (! check ($username, $password)) {
> send_unauthorized_http_headers ();
> }
>
> I guess I can send the 401 response using $r->header_out, but I still
> haven't found out how to get the authentication information: username
> and password.
you can see all of chapter 13 in the cookbook, but a basic
PerlAuthenHandler and example of using the mod_perl authentication API
can be found here:
http://www.modperlcookbook.org/code/ch13/Cookbook/Authenticate.pm
HTH
--Geoff