Fixes 1700
This commit is contained in:
+2
-2
@@ -1320,7 +1320,7 @@ class AuthJWT(object):
|
||||
# is the following safe or should we use
|
||||
# calendar.timegm(datetime.datetime.utcnow().timetuple())
|
||||
# result seem to be the same (seconds since epoch, in UTC)
|
||||
now = time.mktime(datetime.datetime.now().timetuple())
|
||||
now = time.mktime(datetime.datetime.utcnow().timetuple())
|
||||
expires = now + self.expiration
|
||||
payload = dict(
|
||||
hmac_key=session_auth['hmac_key'],
|
||||
@@ -1332,7 +1332,7 @@ class AuthJWT(object):
|
||||
return payload
|
||||
|
||||
def refresh_token(self, orig_payload):
|
||||
now = time.mktime(datetime.datetime.now().timetuple())
|
||||
now = time.mktime(datetime.datetime.utcnow().timetuple())
|
||||
if self.verify_expiration:
|
||||
orig_exp = orig_payload['exp']
|
||||
if orig_exp + self.leeway < now:
|
||||
|
||||
Reference in New Issue
Block a user