mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-13 07:29:39 +00:00
VC/Zoom: Use PyJWT 2
This commit is contained in:
parent
fac4e16428
commit
d43e045d74
@ -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):
|
||||
|
||||
@ -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'
|
||||
],
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user