We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 613e536 commit 7bb135dCopy full SHA for 7bb135d
opentok/opentok.py
@@ -275,7 +275,7 @@ def headers(self):
275
"""For internal use."""
276
return {
277
'User-Agent': 'OpenTok-Python-SDK/' + __version__ + ' ' + platform.python_version(),
278
- 'X-TB-OPENTOK-AUTH': self._create_jwt_auth_header()
+ 'X-OPENTOK-AUTH': self._create_jwt_auth_header()
279
}
280
281
def archive_headers(self):
@@ -451,7 +451,8 @@ def _create_jwt_auth_header(self):
451
payload = {
452
'ist': 'project',
453
'iss': self.api_key,
454
- 'exp': int(time.time()) + (60*5), # 5 minutes
+ 'iat': int(time.time()), # current time in unix time (seconds)
455
+ 'exp': int(time.time()) + (60*3), # 3 minutes in the future (seconds)
456
'jti': '{:f}'.format(random.random())
457
458
0 commit comments