Store created date of cookie

This commit is contained in:
philipp lang 2021-06-23 23:38:56 +02:00
parent a1b3d132bd
commit 68717f0df6
1 changed files with 5 additions and 2 deletions

View File

@ -22,7 +22,10 @@ class CacheCookie {
* Store the current cookie in the cache * Store the current cookie in the cache
*/ */
public function store($mglnr) { public function store($mglnr) {
Cache::forever("namicookie-{$mglnr}", $this->store->getCookieByName('JSESSIONID')->getValue()); Cache::forever("namicookie-{$mglnr}", [
'cookie' => $this->store->getCookieByName('JSESSIONID')->getValue(),
'created_at' => now(),
]);
} }
/** /**
@ -43,7 +46,7 @@ class CacheCookie {
return false; return false;
} }
$this->set($mglnr, $cookie); $this->set($mglnr, $cookie['cookie']);
return true; return true;
} }