perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: Daft question - preventing the username password box from appearing.
Date Tue, 01 Oct 2002 13:28:59 GMT


Martin Moss wrote:
> All,
> 
> How do I change the behaviour of get_basic_auth_passwd()
> 
> I do not wish to have the prompt box appear, I want to have a dynamically
> produced login form which when submitted carries out the users previous
> command (I have an authentication system which 'times out' a user)
> 
> the problem I have is that this doesn't work:-
> 
>  my $response=&timedout($r); #returns a string of html to display
>       $r->custom_response(AUTH_REQUIRED,$response);
>       return AUTH_REQUIRED;
> 
> 
> The problem is this still prompts the user for his username and password,
> and only displays the html is the user presses cancel.
> How do I ditch the login box completely?


use FORBIDDEN instead of AUTH_REQUIRED.

see recipe 13.7 in the Cookbook, or Apache::AuthCookie for examples of 
how this is done (hint, it requires a bit of fancy footwork :)

HTH

--Geoff


Mime
View raw message