public function __construct(array $options = array(), \Nette\Http\Request $request, \Nette\Http\Response $response) { $this->_cookies = $request->getCookies(); $this->_request = $request; $this->_response = $response; $this->setOptions($options); }
/** * Destroy the current session */ public function destroySession() { $this->accessToken = NULL; $this->signedRequest = NULL; $this->user = NULL; $this->session->clearAll(); // Javascript sets a cookie that will be used in getSignedRequest that we need to clear if we can $cookieName = $this->config->getSignedRequestCookieName(); if (array_key_exists($cookieName, $this->httpRequest->getCookies())) { $this->httpResponse->deleteCookie($cookieName, '/', $this->getBaseDomain()); unset($_COOKIE[$cookieName]); } }
public function getCookies() { return $this->request->getCookies(); }