From a62db5482067ded52a4994de62c7766fe4b9ceb4 Mon Sep 17 00:00:00 2001 From: SCHAUAUS GmbH Date: Sat, 4 Apr 2026 14:57:53 +0000 Subject: [PATCH] =?UTF-8?q?public/TokenManager.php=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/TokenManager.php | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 public/TokenManager.php diff --git a/public/TokenManager.php b/public/TokenManager.php new file mode 100644 index 0000000..0eee6da --- /dev/null +++ b/public/TokenManager.php @@ -0,0 +1,66 @@ +storagePath = $storagePath; + $this->$expireDays = $expireDays; + $this->$maxDownloads = $maxDownloads; + $this->$tokenLength = $tokenLength; + } + + // generate a new token and save it to the file system + public generateToken( + string $filename, + string $ownerName, + string $allowedUser + ) { + return (['error'=>'no token generated', 'status'=>'500']); + } + + // retrieve/download the key file connected with the token + public retrieveToken(string $tokenName) { + + } + + // check a token and remove it when it's expired + public cleanupToken(string $tokenName) { + + } + + /* + * PRIVATE FUNCTIONS + */ + + // check whether a token is still valid and accessible by the user requesting it + private validateToken($tokenName) { + return null; + } + + private getDownloadFileInfo ($tokenName) { + $fileInfo = []; + return null; + } +} \ No newline at end of file