After making a GET to the metrics/meetings endpoint, the ‘Expires’ header shows Thu, 01 Jan 1970 00:00:00 GMT where I would expected it to show an expiration date equal to the exp value set during JWT generation.
Am I interpreting that header attribtue incorrectly, or is there something wrong with the way I am setting the ‘exp’ value? I am using pyjwt.
Here’s my Token generation code (in Python3). ttl would be set to 3600 seconds:
def generate\_jwt(ttl):
# jwt payload
jwt\_payload = {
'iss': 'api\_key',
'exp': datetime.utcnow() + timedelta(seconds=ttl)
}
# Encode signature and spit out a utf-8 string
signature = str(jwt.encode(jwt\_payload, 'api\_secret', algorithm='HS256'), 'utf-8')
return signature