Thanks for your response Clayton. Although unfortunately its not working for me as from what i understand:
* When a person has to login (asusming they have no cookie set yet), if they enter the wrong credentials "authen_cred" does a _external redirect_ (aka redirects the browser to go to that url again) - hence subprocess_env is not available from a previous request. If the problem was an incorrect cookie however, the subprocess_env would indeed by handy, as authen_ses_key does an internal redirect, hence you can get the "previous requests" subprocess env... simran. -----Original Message----- From: clayton [mailto:[EMAIL PROTECTED]] Sent: Friday, 23 November 2001 4:26 PM To: simran Cc: [EMAIL PROTECTED] Subject: Re: Apache::AuthCookie login faliure reason 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. >