HTTP/1.1
GET /stars/pollux
Host: galaxies.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsI.eyJpc3MiOiJodHRwczotcGxlL.mFrs3Zo8eaSNcxiNfvRh9dqKP4F1cB
jwt验证的token用heades Authorization ,去服务端验证。
那么这个 Bearer 是什么作用呢?他并不是token的内容。
加 Bearer 这个东西,是能保护token还是怎么的?网上找不到合适的答案,所以这里问一下,他到底干啥的。
没有什么为什么,这就是JWT定义的规范: https://jwt.io/introduction/
建议详读上述官方文档。
Bearer
代表Authorization
头定义的schema,https://developer.mozilla.org...