fix token exp check
This commit is contained in:
parent
3fca94ff29
commit
3cb164cae0
|
@ -23,7 +23,7 @@ class ReosCoordinator(DataUpdateCoordinator):
|
|||
hass,
|
||||
_LOGGER,
|
||||
name="Reos Locks",
|
||||
update_interval=timedelta(seconds=30),
|
||||
update_interval=timedelta(hours=24),
|
||||
)
|
||||
self.api = api
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ class ReosApi:
|
|||
|
||||
def __is_token_valid(self, token: str) -> bool:
|
||||
try:
|
||||
jwt.decode(token, options={"verify_signature": False})
|
||||
token = jwt.decode(token, options={"verify_signature": False, "verify_exp": True}, verify=True)
|
||||
return True
|
||||
except jwt.ExpiredSignatureError:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue