We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JWT => JSON Web Token 的缩写, 是一种轻量级的用户与服务器信息床底规范, 相应规范的标准可以在 RFC 7519 查看, 官网在 jwt.io
jwt 是一个加密过的字符串, 由 Header, payload, signature 三部分组成, 并通过符号 . 对三部分进行拼接. 如 xxx.yyy.zzz
.
xxx.yyy.zzz
Header 部分描述了相应的 JWT 的类型和相应的签名算法, 如:
{ "alg": "HS256", "typ": "JWT" }
{ "iss": "Online JWT Builder", "iat": 1416797419, "exp": 1448333419, "aud": "www.example.com", "sub": "jrocket@example.com", "GivenName": "Johnny", "Surname": "Rocket", "Email": "jrocket@example.com", "Role": [ "Manager", "Project Administrator" ] }
其他还有:
nbf (Not Before):如果当前时间在 nbf 里的时间之前,则 Token 不被接受;一般都会留一些余地,比如几分钟;,是否使用是可选的;
对上面的信息进行 base 编码得到了对应的字符串
The text was updated successfully, but these errors were encountered:
No branches or pull requests
关于 JWT 的理解
JWT => JSON Web Token 的缩写, 是一种轻量级的用户与服务器信息床底规范, 相应规范的标准可以在 RFC 7519 查看, 官网在 jwt.io
jwt 是一个加密过的字符串, 由 Header, payload, signature 三部分组成, 并通过符号
.
对三部分进行拼接. 如xxx.yyy.zzz
Header
Header 部分描述了相应的 JWT 的类型和相应的签名算法, 如:
payload
其他还有:
nbf (Not Before):如果当前时间在 nbf 里的时间之前,则 Token 不被接受;一般都会留一些余地,比如几分钟;,是否使用是可选的;
对上面的信息进行 base 编码得到了对应的字符串
The text was updated successfully, but these errors were encountered: