'Generate a valid JWT token with an expiration date.
:param int expires: The token lifetime, in seconds. Defaults to
1 hour (3600)'

def generate(self, expires=3600):

    payload = self.payload()
    payload['iss'] = self.account_sid
    payload['exp'] = int((time.time() + expires))
    return jwt.encode(payload, self.auth_token)
