protected function _addTokenCookie($token, ServerRequest $request, Response $response)
    {
        $expiry = new Time($this->_config['expiry']);

        $cookie = new Cookie(
            $this->_config['cookieName'],
            $token,
            $expiry,
            $request->getAttribute('webroot'),
            '',
            (bool)$this->_config['secure'],
            (bool)$this->_config['httpOnly']
        );

        return $response->withCookie($cookie);
    }
protected function _addTokenCookie($token, ServerRequest $request, Response $response)
    {
        $expiry = new Time($this->_config['expiry']);

        $cookie = new Cookie(
            $this->_config['cookieName'],
            $token,
            $expiry,
            $request->getAttribute('webroot'),
            '',
            (bool)$this->_config['secure'],
            (bool)$this->_config['httpOnly']
        );

        return $response->withCookie($cookie);
    }
protected function _addTokenCookie ( $ token , ServerRequest $ request , Response $ response ) { $ expiry = new Time ( $ this -> _config [ 'expiry' ] ) ; $ cookie = new Cookie ( $ this -> _config [ 'cookieName' ] , $ token , $ expiry , $ request -> getAttribute ( 'webroot' ) , '' , ( bool ) $ this -> _config [ 'secure' ] , ( bool ) $ this -> _config [ 'httpOnly' ] ) ; return $ response -> withCookie ( $ cookie ) ; }
Add a CSRF token to the response cookies.

@param string $token The token to add.
@param \Cake\Http\ServerRequest $request The request to validate against.
@param \Cake\Http\Response $response The response.
@return \Cake\Http\Response $response Modified response.
Add a CSRF token to the response cookies .