You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Scott Gifford <sg...@suspectclass.com> on 2007/04/18 04:20:00 UTC
Authentication Problem
Hello,
I'm having trouble with PerlAuthenHandler.
The symptom is that in a browser (Firefox at least), I'm prompted for
a password the first time I visit a page. If I enter it incorrectly,
I'm not prompted again, but instead just see the error page.
The cause seems to be that when mod_perl gets an "Authorization"
header in the request, it doesn't supply a "WWW-Authenticate" header
in the response.
Even in a very simple PerlAuthenHandler I see this behavior. I've
attached an example that shows the problem with this configuration:
PerlModule Authen::AlwaysFails
<Directory "/home/sgifford/public_html/authtest">
PerlAuthenHandler Authen::AlwaysFails
AuthType Basic
AuthName "GOOD LUCK"
Require valid-user
</Directory>
I'm running on Debian 3.1 (Sarge), using the distribution copies of
Apache 1.3.33, mod_perl 1.27, and perl 5.8.4.
Any ideas?
Thanks!
----Scott.
Re: Authentication Problem
Posted by Scott Gifford <sg...@suspectclass.com>.
Scott Gifford <sg...@suspectclass.com> writes:
[...]
> The cause seems to be that when mod_perl gets an "Authorization"
> header in the request, it doesn't supply a "WWW-Authenticate" header
> in the response.
Nevermind, found it, the solution was to call:
$r->note_basic_auth_failure();
----Scott.