Linux command
jwt 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
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.