Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: LWP::UserAgent proxy

by SimonPratt (Beadle)
on Feb 27, 2014 at 16:23 UTC ( #1076417=note: print w/ replies, xml ) Need Help??


in reply to LWP::UserAgent proxy

As per the docs:

$ua->get_basic_credentials( $realm, $uri, $isproxy ) This is called by request() to retrieve credentials for documents protected by Basic or Digest Authentication. The arguments passed in is the $realm provided by the server, the $uri requested and a boolean flag to indicate if this is authentication against a proxy server.

The method should return a username and password. It should return an empty list to abort the authentication resolution attempt. Subclasses can override this method to prompt the user for the information. An example of this can be found in lwp-request program distributed with this library.

The base implementation simply checks a set of pre-stored member variables, set up with the credentials() method.

To answer your question, $username is $user and $password is $pass. Extending the class simply allows the caller to store login credentials for the object


Comment on Re: LWP::UserAgent proxy

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1076417]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2014-10-02 01:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (41 votes), past polls