You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
token_login() method doesn't change logged_in attrubte to true. As a result, the token won't be refreshed in run() method.
token_login() method doesn't verify token expiration or refresh it. I would expect an exception if the token had expired (without refreshToken) or if an error happened during refresh.
def token_login(self, token, refresh_token=None):
token_json = {
"token": token,
"refreshToken": refresh_token,
}
self.__save_token(token_json)
self.__load_configuration()
def run(self):
self.stopped = False
while not self.stopped:
try:
check_time = time()
if check_time >= self.token_info["exp"] and self.logged_in:
if self.token_info["refreshToken"]:
self.refresh()
else:
logger.error("No username or password provided!")
sleep(1)
except Exception as e:
logger.exception(e)
break
except KeyboardInterrupt:
break
The text was updated successfully, but these errors were encountered:
I see 2 issues with token_login() method
The text was updated successfully, but these errors were encountered: