public function logout(Adapter\AdapterInterface $adapter = null, Request $request = null)
    {
        $event = $this->prepareEvent($adapter, $request);

        $event->setResult($event->getAdapter()->logout());

        $this->clearIdentity();

        return $this->triggerEventResult(AuthenticationEvent::AUTH_LOGOUT, $event);
    }