Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] How do I index via HTTP when authentication is required?

From: Peter Karman <peter(at)>
Date: Wed Jan 23 2008 - 19:47:39 GMT
On 01/23/2008 01:32 PM, Adam Douglas wrote:
> Hi Peter. Thanks for the reply and pointing this out as I did not see
> this information. However it appears after reading what you have pointed
> out that Swish-E only supports Basic Authentication correct? If so that
> would not work then that I know of, as in my case authentication is done
> via a web form and then handled server side using PHP/MySQL with the use
> of a cookie on the client side to maintain the client's session until
> logout.
> Is there any other way? I do realize I could provide the username and
> password via the URL to the form, however this is dangerous and
> presently the form only accepts via POST not GET. I believe when a
> username and password is provided as query string this is treated as a
> GET.

the way I would do it would be to use WWW::Mechanize (or even LWP::Agent) directly to POST
the user form, obtain the cookie, and then stick that cookie into the request
cookie jar. There aren't any ready-made hooks in to do that AFAIK, so you'd have
to hack yourself (look at the authentication pieces in the code) or
ask/barter/plead with someone on this list to help you.

Peter Karman  .  peter(at)  .

Users mailing list
Received on Wed Jan 23 14:47:38 2008