Beispiel #1
0
 /**
  * Store the login cookie
  *
  * @param IAuthedUser $user
  */
 protected function _setLoginCookie(IAuthedUser $user)
 {
     $request = $this->getCubex()->make('request');
     $domain = $this->_getCookieDomain();
     if ($request instanceof Request) {
         $domain = $this->_getCookieDomain($request);
     }
     Cookie::queue(Cookie::make($this->getCookieName(), $user->serialize(), $this->getCubex()->getConfiguration()->getItem('auth', 'cookie_time', 2592000), null, $domain, ValueAs::bool($this->getCubex()->getConfiguration()->getItem('auth', 'cookie_secure', false))));
 }
Beispiel #2
0
 public function testQueue()
 {
     $cookie = new \Symfony\Component\HttpFoundation\Cookie('test', 'val');
     Cookie::queue($cookie);
     $this->assertTrue(Cookie::getJar()->hasQueued('test'));
 }