Linux command
jwt 命令
文本
Copy it and replace filenames, paths, or keywords as needed.
命令示例
Decode JWT
jwt decode [token]
Encode JWT
jwt encode --secret [secret] --payload '[{"sub":"user"}]'
Decode without verification
jwt decode --no-verify [token]
Show header
jwt decode --header [token]
Encode with algorithm
jwt encode --alg [HS256] --secret [key] --payload '[{}]'
说明
jwt encodes and decodes JSON Web Tokens. It creates and verifies JWTs for authentication systems. The tool supports various signing algorithms. It displays token contents for debugging.
参数
- decode _TOKEN_
- Decode JWT token.
- encode
- Create JWT token.
- --secret _SECRET_
- Signing secret/key.
- --payload _JSON_
- Token payload.
- --alg _ALG_
- Signing algorithm.
- --no-verify
- Skip signature verification.
- --help
- Display help information.
FAQ
What is the jwt command used for?
jwt encodes and decodes JSON Web Tokens. It creates and verifies JWTs for authentication systems. The tool supports various signing algorithms. It displays token contents for debugging.
How do I run a basic jwt example?
Run `jwt decode [token]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does decode _TOKEN_ do in jwt?
Decode JWT token.