Destroy SSO client sessions by iterating through all clients

@param \Flowpack\SingleSignOn\Server\Domain\Model\SsoServer $ssoServer
@param string $sessionId
@param array $ssoClients
@return void
197221
public function destroySession(\Flowpack\SingleSignOn\Server\Domain\Model\SsoServer $ssoServer, $sessionId, array $ssoClients) {
		$requests = array();
		foreach ($ssoClients as $ssoClient) {
			/** @var \Flowpack\SingleSignOn\Server\Domain\Model\SsoClient $ssoClient */
			$request = $ssoClient->buildDestroySessionRequest($ssoServer, $sessionId);
			$this->ssoLogger->log('Destroying session "' . $sessionId . '" on client ' . $ssoClient->getServiceBaseUri(), LOG_INFO);
			$requests[] = $request;
		}
		$responses = $this->requestEngine->sendRequests($requests);

		foreach ($responses as $index => $response) {
			if ($response instanceof \TYPO3\Flow\Http\Exception) {
				$this->ssoLogger->log($response->getMessage(), LOG_WARNING);
			} elseif ($response instanceof \TYPO3\Flow\Http\Response) {
				if ($response->getStatusCode() === 404 && $response->getHeader('Content-Type') === 'application/json') {
					$data = json_decode($response->getContent(), TRUE);
						// Ignore unknown sessions, could be expired on client
					if (is_array($data) && isset($data['error']) && $data['error'] === 'SessionNotFound') {
						continue;
					}
				}

				if ($response->getStatusCode() !== 200) {
					$this->ssoLogger->log('Unexpected status code for destroy session when calling "' . (string)$requests[$index]->getUri() . '": "' . $response->getStatus() . '"', LOG_WARNING);
				}
			}
		}
	}
1196297
public function destroy($sessionID)
    {
        $fileName = $this->getFileName($sessionID);
        if(is_file($fileName))
        {
            unlink($fileName);
        }
    }
282765
public function destroy($sessionId)
    {
        $sql    = 'DELETE from tbl_sessions where SESSION_ID=:SESSID';
        $delete = $this->_db->prepare($sql);
        $delete->execute(array(':SESSID' => $sessionId));
        $this->_cache->delete($sessionId);

        return true;

    }
351418
public function destroy($sessionId)
    {

        // delete the record associated with this id
        $sql = "DELETE FROM $this->table WHERE $this->idCol = :id";

        $stmt = $this->db->query($sql)
                    ->bind(':id', $sessionId)
                    ->execute();

        if ($stmt === false) {
            throw new Exception('Fail destroy session');
        }

        return true;
    }
330571
protected function setSessionId($sessionId) {
    $session = ObjectFactory::getInstance('session');
    $sids = $session->get(self::SIDS_SESSION_VARNAME);
    $sids[$this->serverCli] = $sessionId;
    $session->set(self::SIDS_SESSION_VARNAME, $sids);
  }
1199184
void deactivate(String clientID) {
        for (Subscription s : m_subscriptions) {
            if (s.clientId.equals(clientID)) {
                s.setActive(false);
            }
        }

        //go deep
        for (TreeNode child : m_children) {
            child.deactivate(clientID);
        }
    }
739862
ServerSessionContext unregisterSession(long sessionId) {
    ServerSessionContext session = sessions.remove(sessionId);
    if (session != null) {
      clients.remove(session.client(), session);
      connections.remove(session.client(), session.getConnection());
    }
    return session;
  }
731871
public function down(SessionInterface $session)
    {
        $this->session = $session;
        $this->iterateStructures(false);
        $this->upgradeExternalLinks(false);
    }
811422
public function destroy($sessionId)
    {
        // delete the record associated with this id
        $sql = "DELETE FROM {$this->options['table']} WHERE {$this->options['id_col']} = :id";

        try {
            $stmt = $this->db->prepare($sql);

            $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR);

            $stmt->execute();
        } catch (\PDOException $e) {
            throw new \RuntimeException(
                sprintf(
                    'PDOException was thrown when trying to delete a session: %s',
                    $e->getMessage()
                ),
                0,
                $e
            );
        }

        return true;
    }
9209
public function destroyRegisteredSsoClientSessions(SessionInterface $session) {
		if (!$session->isStarted()) {
			return;
		}

		$ssoClients = $this->getRegisteredSsoClients($session);
		$sessionId = $session->getId();

		$ssoServer = $this->ssoServerFactory->create();
		$this->ssoClientNotifier->destroySession($ssoServer, $sessionId, $ssoClients);
	}
219172
public function buildDestroySessionRequest(SsoServer $ssoServer, $sessionId) {
		$serviceUri = new Uri(rtrim($this->serviceBaseUri, '/') . '/session/' . urlencode($sessionId) . '/destroy');
		$serviceUri->setQuery(http_build_query(array('serverIdentifier' => $ssoServer->getServiceBaseUri())));
		$request = \TYPO3\Flow\Http\Request::create($serviceUri, 'DELETE');
		$request->setContent('');

		return $this->requestSigner->signRequest($request, $ssoServer->getKeyPairFingerprint(), $ssoServer->getKeyPairFingerprint());
	}
1293072
public function destroySession() {
    $this->accessToken = null;
    $this->signedRequest = null;
    $this->user = null;
    $this->clearAllPersistentData();

    // Javascript sets a cookie that will be used in getSignedRequest that we
    // need to clear if we can
    $cookie_name = $this->getSignedRequestCookieName();
    if (array_key_exists($cookie_name, $_COOKIE)) {
      unset($_COOKIE[$cookie_name]);
      if (!headers_sent()) {
        $base_domain = $this->getBaseDomain();
        setcookie($cookie_name, '', 1, '/', '.'.$base_domain);
      } else {
        // @codeCoverageIgnoreStart
        self::errorLog(
          'There exists a cookie that we wanted to clear that we couldn\'t '.
          'clear because headers was already sent. Make sure to do the first '.
          'API call before outputing anything.'
        );
        // @codeCoverageIgnoreEnd
      }
    }
  }
1022234
public function do_destroy($session_id)
    {
        $redis = is_object($this->_redis) ? $this->_redis : $this->_getRedis();
        $redis->delete($this->_prefix . $session_id);

        return true;
    }
1211110
public function destroy($session_id)
	{
		// Get the database connection object and verify its connected.
		if (!$this->connection->connected())
		{
			return false;
		}

		try
		{
			$query = $this->connection->getQuery()
				->delete('#__session')
				->whereEquals('session_id', $session_id);

			// Remove a session from the database.
			$this->connection->setQuery($query->toString());

			return (boolean) $this->connection->execute();
		}
		catch (Exception $e)
		{
			return false;
		}
	}
871829
def delete_session(self, client_id):
        
        try:
            session = self._sessions[client_id][0]
        except KeyError:
            session = None
        if session is None:
            self.logger.debug("Delete session : session %s doesn't exist" % client_id)
            return

        # Delete subscriptions
        self.logger.debug("deleting session %s subscriptions" % repr(session))
        self._del_all_subscriptions(session)

        self.logger.debug("deleting existing session %s" % repr(self._sessions[client_id]))
        del self._sessions[client_id]
377457
public function destroy($sessionId)
    {
        parent::destroy($sessionId);
        if (isset($_COOKIE[$this->cookieKeyName])) {
            setcookie($this->cookieKeyName, '', 1);
            unset($_COOKIE[$this->cookieKeyName]);
        }
        return true;
    }
592713
public function destroy($sessionID): bool
    {
        $where = ['session_id' => $sessionID];
        $query = $this->dbClass->prepare()->delete()->from($this->dbTable)->where($where);
        $result = $this->dbClass->execute($query) == 1 ? true : false;

        return $result;
    }