From: Dietmar Maurer Date: Thu, 6 Apr 2017 09:03:41 +0000 (+0200) Subject: allow to specify cookie_name X-Git-Url: https://git.proxmox.com/?p=pve-apiclient.git;a=commitdiff_plain;h=444d64191120fb8359844fe2067f934b629c29d6;ds=sidebyside allow to specify cookie_name --- diff --git a/PVE/APIClient/LWP.pm b/PVE/APIClient/LWP.pm index 51112e2..2ae8c1a 100755 --- a/PVE/APIClient/LWP.pm +++ b/PVE/APIClient/LWP.pm @@ -87,7 +87,7 @@ sub update_ticket { $self->{ticket} = $ticket; my $encticket = uri_escape($ticket); - my $cookie = "PVEAuthCookie=$encticket; path=/; secure;"; + my $cookie = "$self->{cookie_name}=$encticket; path=/; secure;"; $agent->default_header('Cookie', $cookie); } @@ -290,6 +290,7 @@ sub new { host => $param{host} || 'localhost', port => $param{port}, protocol => $param{protocol}, + cookie_name => $param{cookie_name} // 'PVEAuthCookie', manual_verification => $param{manual_verification}, cached_fingerprints => $param{cached_fingerprints} || {}, verify_fingerprint_cb => $param{verify_fingerprint_cb},