Name
get_basic_credentials
Synopsis
$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, such as asking the user for the account
information, or referring to authentication information in a
file. All you need to do is return a list in which the first
element is a username and the second element is a
password.
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.