Skip to content

Instantly share code, notes, and snippets.

@guessi
Created January 24, 2025 07:39
Show Gist options
  • Save guessi/48f36b0d48109586d7e63593c3f053b7 to your computer and use it in GitHub Desktop.
Save guessi/48f36b0d48109586d7e63593c3f053b7 to your computer and use it in GitHub Desktop.
One-liner JWT token decode with PyJWT
# https://pyjwt.readthedocs.io/en/stable/
python3 -m pip install PyJwt
# https://pyjwt.readthedocs.io/en/stable/usage.html#reading-the-claimset-without-validation
echo token_file_name | python3 -c 'import sys,jwt; f = open(sys.stdin.read().strip()); decoded_jwt = jwt.decode(f.readline(), options={"verify_signature": False}); print(decoded_jwt); f.close();'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment