[IMP] pms: add add exp date to jwt data

This commit is contained in:
miguelpadin
2021-08-05 23:06:32 +02:00
committed by Darío Lodeiros
parent 78da297eb4
commit 41a1df4fda
14 changed files with 106 additions and 25 deletions

View File

@@ -26,9 +26,8 @@ class Validator:
# (in form company?)
return "CHANGE THIS KEY"
def create_token(self, user):
def create_token(self, user, exp):
try:
exp = datetime.datetime.utcnow() + datetime.timedelta(days=30)
payload = {
"exp": exp,
"iat": datetime.datetime.utcnow(),