Validation.txt
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
// TODO Auto-generated method stub
String signature = req.getParameter("signature");
String timestamp = req.getParameter("timestamp");
String nonce = req.getParameter("nonce");
String echostr = req.getParameter("echostr");
System.out.println("验证签名"+signature);
System.out.println("时间戳"+timestamp);
System.out.println("随机数"+nonce);
System.out.println("随机字符串"+echostr);
//输出流
PrintWriter out = resp.getWriter();
if(ValidationTools.checkSignature(signature, timestamp, nonce))
{
out.print(echostr);//
}
out.close();
out=null;
}
protec