You are here

public function CookieJar::clearSessionCookies in Auth0 Single Sign On 8.2

Discard all sessions cookies.

Removes cookies that don't have an expire field or a have a discard field set to true. To be called when the user agent shuts down according to RFC 2965.

Overrides CookieJarInterface::clearSessionCookies

File

vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php, line 149

Class

CookieJar
Cookie jar that stores cookies as an array

Namespace

GuzzleHttp\Cookie

Code

public function clearSessionCookies() {
  $this->cookies = array_filter($this->cookies, function (SetCookie $cookie) {
    return !$cookie
      ->getDiscard() && $cookie
      ->getExpires();
  });
}