Piwik\Plugins\Login\SessionInitializer::processSuccessfulSession PHP Method

processSuccessfulSession() protected method

Executed when the session was successfully authenticated.
protected processSuccessfulSession ( Piwik\AuthResult $authResult, boolean $rememberMe )
$authResult Piwik\AuthResult The successful authentication result.
$rememberMe boolean Whether the authenticated session should be remembered after the browser is closed or not.
    protected function processSuccessfulSession(AuthResult $authResult, $rememberMe)
    {
        $cookie = $this->getAuthCookie($rememberMe);
        $cookie->set('login', $authResult->getIdentity());
        $cookie->set('token_auth', $this->getHashTokenAuth($authResult->getIdentity(), $authResult->getTokenAuth()));
        $cookie->setSecure(ProxyHttp::isHttps());
        $cookie->setHttpOnly(true);
        $cookie->save();
    }