From 8515b1fc05999c4b91579934b7da287e0d60fb06 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sat, 19 Feb 2022 19:12:33 +0100 Subject: [PATCH] Fixed: Store cookie in the same filename as the last one --- src/Authentication/MainCookie.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Authentication/MainCookie.php b/src/Authentication/MainCookie.php index 62a7573..795ffd7 100644 --- a/src/Authentication/MainCookie.php +++ b/src/Authentication/MainCookie.php @@ -23,6 +23,7 @@ class MainCookie extends Authenticator { unlink($file); } + $cookieFile = $this->newFileName(); $this->http()->get($this->url.'/ica/pages/login.jsp'); $response = $this->http()->asForm()->post($this->url.'/ica/rest/nami/auth/manual/sessionStartup', [ 'Login' => 'API', @@ -37,7 +38,7 @@ class MainCookie extends Authenticator { throw $e; } - $this->cookie->save($this->newFileName()); + $this->cookie->save($cookieFile); return $this; }