add quick and dirty token validator
This commit is contained in:
parent
0f47b8abd6
commit
86ffd877b4
16
tools/decode_token.py
Normal file
16
tools/decode_token.py
Normal 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}")
|
Loading…
x
Reference in New Issue
Block a user