Bolt\Session\SessionListener::appendRealmToName PHP Method

appendRealmToName() protected method

protected appendRealmToName ( Request $request )
$request Symfony\Component\HttpFoundation\Request
    protected function appendRealmToName(Request $request)
    {
        if (!$this->options->getBoolean('restrict_realm')) {
            return;
        }
        $name = $this->session->getName();
        $realm = '_' . md5($request->getHttpHost() . $request->getBasePath());
        if (substr($name, -strlen($realm)) === $realm) {
            // name ends with realm
            return;
        }
        $this->session->setName($name . $realm);
    }