[sf-perl] LWP::UserAgent question
S A
parallax99 at hotmail.com
Tue Jul 26 12:00:48 PDT 2005
Hi All,
I've been asked to include some search functionality in a perl CGI program
that I'm writing. Fortunately, this functionality is already available on
the same server as a separate CGI program. Thus, I decided to leverage this
by using LWP::UserAgent to make a request and then do nifty things with the
response.
The server was recently switched over to LDAP authentication, and both my
program and the search program fall under the realm where authentication is
necessary before getting a successful response, but the same
username/password should be valid for both. The user is logged in if
they're inside my CGI program, but I've been struggling with setting up the
proper credentials for the call to the search program. Specifically, I
don't know how to fetch the username and password. I need to make the call
invisible to the user, so I need to somehow get the user/pwd that's
currently being used and supply them as credentials to the request I'm
composing. Without it, the request keeps giving a 401 Authentication error.
Can anyone tell me how to fetch these two items? Is there some simple API
that I can use? I'm sure I'm not the first person to try this....
Thanks!
/S
-
Stefan Amshey
parallax99 at hotmail.com
More information about the SanFrancisco-pm
mailing list