Last active
June 17, 2021 08:01
-
-
Save black23/bce03ad51b39bb3394f4afa7e24cba9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import datetime | |
import jwt # pip install pyjwt | |
app_id = 'SIGLA' | |
shared_secret = 'add_secret_here' | |
now = datetime.datetime.utcnow() | |
token_dict = dict( | |
iss = app_id, | |
iat = now, | |
exp = now + datetime.timedelta(seconds=3600), | |
app = app_id, | |
) | |
token = jwt.encode(token_dict, shared_secret, algorithm='HS256') | |
print(token) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment