authPluginFactory = $authPluginFactory; } public function __invoke(ServerRequest $request): void { if (! $request->isPost() || $GLOBALS['token_mismatch']) { Core::sendHeaderLocation('./index.php?route=/'); return; } $authPlugin = $this->authPluginFactory->create(); $authPlugin->logOut(); } }