Bill Moseley wrote: > > At 04:09 PM 11/23/2001 +1100, 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? > > <<<< > Apache::AuthCookieURL does that. IIRC, it sets a cookie with the failure > reason that's returned from authen_cred call. > > >>>> >
in the code line 154 is this: $r->subprocess_env('AuthCookieReason', 'bad_cookie'); and on 157 this: $r->subprocess_env('AuthCookieReason', 'no_cookie'); im not sure why your having problems on setting this the examples in the cpan tarball on the login.pl page are like this #!/usr/bin/perl use strict; my $r = Apache->request; $r->status(200); my $uri = $r->prev->uri; my $reason = $r->prev->subprocess_env("AuthCookieReason"); then in his html code it says: <P>Failure reason: '$reason'. Please enter your login and password to authenticate.</P> which shows up if its a 'bad cookie' or 'no cookie' basically the authentication failed one thing to mention in the prev not prev subprocess is that you set it as subprocess_env and then call it with prev later