add quick and dirty token validator

This commit is contained in:
Phil 2025-01-07 10:16:37 -07:00
parent 0f47b8abd6
commit 86ffd877b4

16
tools/decode_token.py Normal file
View File

@ -0,0 +1,16 @@
import jwt
import sys
if len(sys.argv) != 2:
print("Usage: python decode_jwt.py <JWT_TOKEN>")
sys.exit(1)
token = sys.argv[1]
try:
# Decode the token without verifying the signature
decoded = jwt.decode(token, options={"verify_signature": False})
print("Decoded JWT:")
print(decoded)
except jwt.DecodeError as e:
print(f"Failed to decode JWT: {e}")