VC/Zoom: Use PyJWT 2

This commit is contained in:
Adrian Moennich 2021-01-05 15:35:29 +01:00
parent fac4e16428
commit d43e045d74
2 changed files with 2 additions and 3 deletions

View File

@ -48,8 +48,7 @@ class BaseComponent:
def token(self):
header = {'alg': 'HS256', 'typ': 'JWT'}
payload = {'iss': self.config['api_key'], 'exp': int(time.time() + 3600)}
token = jwt.encode(payload, self.config['api_secret'], algorithm='HS256', headers=header)
return token.decode('utf-8')
return jwt.encode(payload, self.config['api_secret'], algorithm='HS256', headers=header)
@property
def session(self):

View File

@ -17,6 +17,6 @@ setup(
version='3.0-dev',
install_requires=[
'indico>=3.0.dev0',
'PyJWT>=1.7.1,<2'
'PyJWT>=2.0.0,<3'
],
)