I am using JWT
token to authorize my APIs, during implementation I found header and payload in token always start with eyJ
. What does this indicate?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
JWTs consist of base64url encoded JSON, and a JSON structure just starts with {"...
, which becomes ey...
when encoded with a base64 encoder.
The JWT header starts with {"alg":...
, which then becomes eyJ...
You can try on this online encoder and enter {"alg"
and click on encode. The result will be eyJhbGciPSA=