JwtBearer

2018/08/20 posted in  Web前端

JWT Token由以下三部分组成:

  • PAYLOAD:DATA

    {
      "sub": "1234567890",
    "name": "John Doe",
    "iat": 1516239022
    }
  • VERIFY SIGNATURE

    HMACSHA256(
      base64UrlEncode(header) + "." +
    base64UrlEncode(payload),
    your-256-bit-secret
    )