mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] pms: add add exp date to jwt data
This commit is contained in:
committed by
Darío Lodeiros
parent
78da297eb4
commit
41a1df4fda
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user