logger = $logger; $this->shareManager = $shareManager; $this->config = new AppConfig($this->appName); $this->fileUtility = new FileUtility($AppName, $trans, $logger, $this->config, $shareManager, $session); } /** * Returns the origin document key for editor * * @param string $shareToken - access token * @param string $path - file path * * @return DataResponse * * @NoAdminRequired * @NoCSRFRequired * @PublicPage */ public function key($shareToken, $path) { list ($file, $error, $share) = $this->fileUtility->getFileByToken(null, $shareToken, $path); if (isset($error)) { $this->logger->error("Federated getFileByToken: $error", array("app" => $this->appName)); return new DataResponse(["error" => $error]); } $key = $this->fileUtility->getKey($file, true); $this->logger->debug("Federated request get for " . $file->getId() . " key $key", array("app" => $this->appName)); return new DataResponse(["key" => $key]); } }