Commit 0e5eda33 authored by Fence's avatar Fence 🌈

fix exp in the test jwt scripts

parent 9da6ea30
......@@ -10,10 +10,9 @@ key = None
with open(sys.argv[2], "r") as file:
key = file.read()
payload["iss"] = sys.argv[1]
payload["iat"] = datetime.utcnow()
payload["exp"] = datetime.utcnow() + timedelta(expires)
payload["exp"] = datetime.utcnow() + timedelta(minutes=expires)
payload["song"] = sys.argv[3]
print(jwt.encode(payload, key, algorithm='RS256'))
......@@ -13,6 +13,6 @@ with open(sys.argv[2], "r") as file:
payload["iss"] = sys.argv[1]
payload["iat"] = datetime.utcnow()
payload["exp"] = datetime.utcnow() + timedelta(expires)
payload["exp"] = datetime.utcnow() + timedelta(minutes=expires)
print(jwt.encode(payload, key, algorithm='RS256'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment