Bolt\Controller\Backend\BackendBase::setAuthenticationCookie PHP Method

setAuthenticationCookie() protected method

Set the authentication cookie in the response.
protected setAuthenticationCookie ( Request $request, Response $response, string $token ) : Response
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response
$token string
return Symfony\Component\HttpFoundation\Response
    protected function setAuthenticationCookie(Request $request, Response $response, $token)
    {
        $response->setVary('Cookies', false)->setMaxAge(0)->setPrivate();
        $response->headers->setCookie(new Cookie($this->app['token.authentication.name'], $token, time() + $this->getOption('general/cookies_lifetime'), $request->getBasePath(), $this->getOption('general/cookies_domain'), $this->getOption('general/enforce_ssl'), true));
        return $response;
    }