JSON Web Token: Encode and Decode JWT with the secret
Using ticarpi/jwt_tool:
jwt_tool.py eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiSm9obiBEb2UifQ.xuEv8qrfXu424LZk8bVgr9MQJUIrp1rHcPyZw_KSsds jwt_tool.py eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiSm9obiBEb2UifQ.xuEv8qrfXu424LZk8bVgr9MQJUIrp1rHcPyZw_KSsds -T Token header values: [+] alg = "HS256" [+] typ = "JWT" Token payload values: [+] name = "John Doe"Using pyjwt:
pip install pyjwtimport jwt encoded = jwt.encode({'some': 'payload'}, 'secret', algorithm='HS256') jwt.decode(encoded, 'secret', algorithms=['HS256'])
Comments
No comments yet.