public function remember(ResponseInterface $response, AccessToken $token, $session = false) { $cookie = $this->createCookie()->withValue($token->id); if (!$session) { $lifetime = 60 * 60 * 24 * 14; $token->lifetime = $lifetime; $token->save(); $cookie = $cookie->withMaxAge($lifetime); } return FigResponseCookies::set($response, $cookie); }
public function remember(ResponseInterface $response, AccessToken $token) { $token->lifetime = 60 * 60 * 24 * 14; $token->save(); return FigResponseCookies::set($response, $this->createCookie()->withValue($token->id)->withMaxAge(14 * 24 * 60 * 60)); }