JWT Token由以下三部分组成:
-
{ "alg": "HS256", "typ": "JWT" }
-
{ "sub": "1234567890", "name": "John Doe", "iat": 1516239022 }
-
VERIFY SIGNATURE
HMACSHA256( base64UrlEncode(header) + "." + base64UrlEncode(payload), your-256-bit-secret )
{
"alg": "HS256",
"typ": "JWT"
}
{
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022
}
VERIFY SIGNATURE
HMACSHA256(
base64UrlEncode(header) + "." +
base64UrlEncode(payload),
your-256-bit-secret
)
Copyright © 2013 Powered by MWeb, Theme used GitHub CSS. 豫ICP备16018939号-2