Skip to content

springml-code/jwt_ref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

JWT Creation and Verification

This example shows how to create RS512 keys and use them to create and verify JWT tokens.

First install pyjwt via:

pip install pyjwt

and ensure you have at least Python 3.5.

Then generate keys by running:

bash keygen.sh <keyname>

where <keyname> has .key at the end of it, like test.key. This creates a private and public key in the same directory.

Then run:

python pyjwt_example.py <private keyname> <public keyname>

It will print the JWT, the original message, and the decoded message. You can and should also verify your JWT token on a site like https://jwt.io/.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published