thingsboard-python-rest-client icon indicating copy to clipboard operation
thingsboard-python-rest-client copied to clipboard

self.token_info['exp'] never written

Open kellergoech opened this issue 2 years ago • 1 comments

Why is the self.token_info['exp'] variable never written? Shouldn't it be set to the timeout variable of the jwt Token + actual time on getting a new key? Otherwise it will update every second to a new key or am I wrong with that?

kellergoech avatar Jun 22 '22 11:06 kellergoech

This is what is happening and it is a problem with the RestClientPE. At each refresh, the __load_configuration function of the RestClientBase class is called, resetting the controllers (replacing those imported from api_pe by api_ce).

I made a pull request (https://github.com/thingsboard/thingsboard-python-rest-client/pull/121) to at least fix the problem of the refresh being done every second.

Nolat avatar May 24 '23 07:05 Nolat