Re: LWP:Authen:NTLM



"Ron T." typed:

I've been looking up on how to use this module, following all the
documentation and cookbooks related to it, and I'm not really sure why
I can't get through. The credentials() function is vaguely described
and I can't really find much info on this.

Have you tried it? Getting LWP::Authen::Ntlm to work is tricky. I use the
following in production code to authenticate with IIS with NTLM
authentication enabled:

my $ip = '192.168.1.1';
my $port = '443';
# This generally works. If you have domain set up to something else,
# use that, of course.
my $domain = "workgroup";
my $user = 'user';
my $pass = 'pass';
my $useragent = new LWP::UserAgent(keep_alive => 1);
$useragent->credentials("$ip:$port", '', "$domain\\$user", "$pass");

It will help massively if you enable debugging with:

use LWP::Debug qw(+);

--
Ayaz Ahmed Khan

A witty saying proves nothing, but saying something pointless gets
people's attention.

.