eZ\Bundle\EzPublishRestBundle\Features\Context\SubContext\Authentication::cleanupSession PHP Method

cleanupSession() public method

public cleanupSession ( )
    public function cleanupSession()
    {
        if ($this->userSession) {
            $this->resetDriver();
            $this->createRequest('delete', "/user/sessions/{$this->userSession->sessionId}");
            $this->restDriver->setHeader('cookie', "{$this->userSession->sessionName}={$this->userSession->sessionId}");
            $this->restDriver->setHeader('x-csrf-token', $this->userSession->csrfToken);
            $this->sendRequest();
            $this->userSession = null;
        }
    }