Skip to content
Snippets Groups Projects
Commit a7951bf4 authored by Matevz Erzen's avatar Matevz Erzen
Browse files

Minor bug fix

parent eed1854b
No related branches found
No related tags found
No related merge requests found
VERSION=v0.0.10
VERSION=v0.0.11
SERVICE=evidence-collector
......@@ -34,10 +34,10 @@ class ClouditorAuthentication(object):
token = json.loads(access_token_response.text)
self.__access_token = token['access_token']
self.__token_expiration_time = datetime.utcnow() + timedelta(seconds=token['expires_in'])
self.__token_expiration_time = datetime.utcnow() + timedelta(seconds=(token['expires_in'] - 10))
self.logger.info("New OAuth2 token successfully acquired")
self.logger.debug("OAuth2 token expiring at: " + str(self.__token_expiration_time - 10))
self.logger.debug("OAuth2 token expiring at: " + str(self.__token_expiration_time))
def get_token(self):
# In practice this condition isn't even needed as every scheduled job creates new ClouditorAuthentication object and acquires new token.
......
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