protected function writeSessionTo(Response $response)
    {
        // TODO: Take these values from config
        $lifetime = Carbon::now()->addMinutes(120);
        $path = '/';
        $domain = null;
        $secure = false;

        $response->headers->setCookie(new Cookie(
            $this->session->getName(),
            $this->session->getId(),
            $lifetime,
            $path,
            $domain,
            $secure
        ));
    }