Skip to content

colindev/go-jwx-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

jwx tool

提供命令列 jwt 加解密與驗證

語法

產生token

./jwx-tool <secret> < [FILE]

# or

echo <json string> | ./jwx-tool <secret>

example

echo '{"num":123}' | ./jwx-tool xyz
# eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJudW0iOjEyM30.2U4ZKC-yACzysDm_CUI5ONuylTgcQN-wURjqexcqxJY

解析與驗證

./jwx-tool -d <secret> < [FILE]

# or

echo <token string> | ./jwx-tool -d <secret>

example

echo 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJudW0iOjEyM30.2U4ZKC-yACzysDm_CUI5ONuylTgcQN-wURjqexcqxJY' | ./jwx-tool -d aaa
# signature is invalid

echo 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJudW0iOjEyM30.2U4ZKC-yACzysDm_CUI5ONuylTgcQN-wURjqexcqxJY' | ./jwx-tool -d xyz
# {"num":123}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages