home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


get_basic_credentials

 $

ua


->get_basic_credentials
(

realm

, 

url

)

Returns the list containing the username and password for the given realm and url when authentication is required by the server. This function is usually called internally by request . This method becomes useful when creating a subclass of LWP::UserAgent with its own version of get_basic_credentials . From there, you can rewrite get_basic_credentials to do more flexible things, like asking the user for the account information, or referring to authentication information in a file. All you need to do is return a list, where the first element is a username and the second element is a password.


Previous: Reference: from Perl in a Nutshell Next: Reference: is_protocol_supported
Reference: from Book Index Reference: is_protocol_supported

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.