Lines 107-113
sub new {
Link Here
|
107 |
|
107 |
|
108 |
my $get_resp = $ua->get("$url/authentication"); |
108 |
my $get_resp = $ua->get("$url/authentication"); |
109 |
my $csrf_token = $get_resp->header('CSRF-TOKEN'); |
109 |
my $csrf_token = $get_resp->header('CSRF-TOKEN'); |
110 |
$self->{csrf_token} = $csrf_token; |
|
|
111 |
|
110 |
|
112 |
my $resp = $ua->post( |
111 |
my $resp = $ua->post( |
113 |
"$url/authentication", |
112 |
"$url/authentication", |
Lines 115-120
sub new {
Link Here
|
115 |
); |
114 |
); |
116 |
die $resp->status_line unless $resp->is_success; |
115 |
die $resp->status_line unless $resp->is_success; |
117 |
|
116 |
|
|
|
117 |
#NOTE: A successful authentication means we have a new CGISESSID and a new CSRF Token |
118 |
$csrf_token = $resp->header('CSRF-TOKEN'); |
119 |
$self->{csrf_token} = $csrf_token; |
120 |
|
118 |
warn "# $user $url = ", $resp->decoded_content, "\n" if $self->{debug}; |
121 |
warn "# $user $url = ", $resp->decoded_content, "\n" if $self->{debug}; |
119 |
|
122 |
|
120 |
$self->{ua} = $ua; |
123 |
$self->{ua} = $ua; |
121 |
- |
|
|