Skip to content
Snippets Groups Projects
Verified Commit b5647f21 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

REVERT some uninteded changes in auth_token.py

parent 0926a206
No related branches found
No related tags found
1 merge request!110ENH: new `page_length` parameter for execute_query
Checking pipeline status
......@@ -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"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment