From b5647f2127daa8048e0091c53e6f2769b1a10245 Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Fri, 22 Sep 2023 12:06:52 +0200
Subject: [PATCH] REVERT some uninteded changes in auth_token.py

---
 src/caosdb/connection/authentication/auth_token.py | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/src/caosdb/connection/authentication/auth_token.py b/src/caosdb/connection/authentication/auth_token.py
index 00f614fd..68812386 100644
--- a/src/caosdb/connection/authentication/auth_token.py
+++ b/src/caosdb/connection/authentication/auth_token.py
@@ -62,20 +62,12 @@ class AuthTokenAuthenticator(AbstractAuthenticator):
     def __init__(self):
         super(AuthTokenAuthenticator, self).__init__()
         self.auth_token = None
-        self._initial_one_time_token = None
         self._connection = None
 
     def login(self):
         self._login()
 
     def _login(self):
-        if self._initial_one_time_token is not None:
-            # retry first (this could work if maxReplay > 1)
-            self.auth_token = self._initial_one_time_token
-            headers = {'Cookie': auth_token_to_cookie(self.auth_token)}
-            self._connection.request(method="DELETE", path="logout",
-                                     headers=headers)
-
         raise LoginFailedError("The authentication token is expired or you "
                                "have been logged out otherwise. The "
                                "auth_token authenticator cannot log in "
@@ -95,7 +87,6 @@ class AuthTokenAuthenticator(AbstractAuthenticator):
 
     def configure(self, **config):
         if "auth_token" in config:
-            self._initial_one_time_token = config.["auth_token"]
             self.auth_token = config["auth_token"]
         if "connection" in config:
             self._connection = config["connection"]
-- 
GitLab