jwt可用于跨域认证
简介
{
"alg": "HS256",
"typ": "JWT"
}
常用负载:可选
{
"iat": 1593955943,
"exp": 1593955973,
"uid": 10,
"username": "test",
"scopes": [ "admin", "user" ]
}
// header,中指定算法对JWT进行签名,secret秘钥
// secret,加密算法秘钥
signature=HMACSHA256(base64UrlEncode(header) + "." +base64UrlEncode(payload),secret)
注意: