diff --git a/tools/decode_token.py b/tools/decode_token.py new file mode 100644 index 0000000..f68bb8c --- /dev/null +++ b/tools/decode_token.py @@ -0,0 +1,16 @@ +import jwt +import sys + +if len(sys.argv) != 2: + print("Usage: python decode_jwt.py ") + 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}")