JWT算法的重点是什么?
JWT标头看起来像这样:
{
"alg": "HS256",
"typ": "JWT"
}
此标头将是基本64编码和加密的。 因此,如果将JWT发送到服务器,服务器已经知道算法如何加密JWT。因此,拥有“ ALG”:“ HS256”的意义是什么?另外,“ typ”:“ JWT”实际上您也不需要这些信息。服务器知道他会得到JWT。那么所有这些标题都只是用于文档吗?
The jwt header looks like this:
{
"alg": "HS256",
"typ": "JWT"
}
This header will be Base64 encoded and encrypted.
So if you send the JWT to the server, the server already knows the algorithm how the JWT is encrypted. So what is the point of having "alg": "HS256" . Also "typ":"JWT" actually you don't need that information as well. Server knows he will get a JWT. So is all this header just for documentation there ??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论