move _jwt_is_expired to utils

This commit is contained in:
Michaël De Boey
2025-03-16 23:40:50 +01:00
parent 98a68be9b8
commit 1b1117a9c5
12 changed files with 32 additions and 22 deletions
+4 -2
View File
@@ -11,6 +11,7 @@ from ..utils import (
float_or_none,
int_or_none,
jwt_decode_hs256,
jwt_is_expired,
parse_age_limit,
try_call,
url_or_none,
@@ -105,8 +106,9 @@ class JioCinemaBaseIE(InfoExtractor):
'os': ('os', {str}),
})}, data=data)
def _is_token_expired(self, token):
return self._jwt_is_expired(token, 180)
@staticmethod
def _is_token_expired(token):
return jwt_is_expired(token, 180)
def _perform_login(self, username, password):
if self._ACCESS_TOKEN and not self._is_token_expired(self._ACCESS_TOKEN):