|
I am trying to authenticate and pull a file from a server that is being authenticated by a siteminder server. I always just get the login page as if my username and password never get passed. I did notice that there is a form listed that has an action of sending to login.fcc, but not sure if I am supposed to send to that also?
Has any tried using lwp to authenticate to siteminder?
Here is my code:
#!c:/perl/bin/perl.exe
use strict; use Crypt::SSLeay; use HTTP::Request::Common qw(POST); use LWP::UserAgent; use HTTP::Cookies;
my $ua = LWP::UserAgent-> new(); $ua-> agent('Mozilla/5.0'); $ua->cookie_jar(HTTP::Cookies->new(file=>'lwp-cookies2.txt',autosave=>1));
my $url = ""> my $req = POST $url, ['username' => 'password']; my $content = $ua-> request($req)->as_string; print $content;
print "=================================================\n";
# don't create a new agent here
$url = ""> $req = new HTTP::Request 'GET', $url; $content = $ua-> request($req)->as_string; print $content;
Larry Palkendo
|
_______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
