yes its pretty easy one to do,

btw:
i first found out how by investigating the Apache::AuthCookie code

here is the meat of the matter
send something like this to the $r->subprocess_env
{the name im using is the same as authcookie's with the 2 added}
 $r->subprocess_env('AuthCookieReason2', 'username invalid!');

then in your login.cgi {or handler or w.h.y.}
you can do this:
my $error=$r->prev->subprocess_env('AuthCookieReason2') 
||$r->prev->subprocess_env('AuthCookieReason') ;

or use 'defined' or w.h.y.

then you can place $error wherever you please


hope that helps


simran wrote:

> Hi All,
>
>  
>
> I am having some trouble getting Apache::AuthCookie (version 3 which i 
> believe is the latest version) to do what want:
>
>  
>
> What i want is:
>
>  
>
> * To be able to give the user a reson if login fails
>
>   - eg reason: * "No such username"
>
>                     * "Your password was incorrect"
>
>  
>
> Has anyone else come across the same requirement/issue, and how have 
> you solved it?
>
>  
>
> It seems like a difficult one to solve (in a clean way) as the only 
> way i can think of doing it is either setting
>
> another cookie (with the auth failure reason) or adding to the URL 
> query parameters and then reading them
>
> when displaying the login page...
>
>  
>
> simran.
>


Reply via email to