|
|
|
@@ -342,6 +342,7 @@ public class WxUserGrantController extends BaseController { |
|
|
|
* @param request |
|
|
|
* @throws IOException |
|
|
|
*/ |
|
|
|
@AuthIgnore |
|
|
|
@RequestMapping(value = "/signature") |
|
|
|
@ResponseBody |
|
|
|
public void signature(HttpServletResponse response, HttpServletRequest request) throws IOException { |
|
|
|
@@ -352,16 +353,15 @@ public class WxUserGrantController extends BaseController { |
|
|
|
String nonce = request.getParameter("nonce"); |
|
|
|
String echostr = request.getParameter("echostr"); |
|
|
|
|
|
|
|
logger.warn("收到的微信服务验证信息"+signature+"\n"+timestamp+"\n"+nonce+"\n"+echostr); |
|
|
|
logger.warn("收到的微信服务验证信息:"+signature+"\n"+timestamp+"\n"+nonce+"\n"+echostr); |
|
|
|
PrintWriter out = response.getWriter(); |
|
|
|
/* |
|
|
|
// 通过检验signature对请求进行校验,若校验成功则原样返回echostr,表示接入成功,否则接入失败 |
|
|
|
if (CheckUtil.checkSignature(wp.getToken(), signature, timestamp, nonce)) { |
|
|
|
// 当前无法确定此消息的appId及token, 所以直接返回echostr |
|
|
|
//if (CheckUtil.checkSignature(wp.getToken(), signature, timestamp, nonce)) { |
|
|
|
out.print(echostr); |
|
|
|
logger.warn("微信服务验证成功===================="+echostr); |
|
|
|
System.out.println("微信服务验证成功!"); |
|
|
|
} |
|
|
|
*/ |
|
|
|
//} |
|
|
|
out.close(); |
|
|
|
} |
|
|
|
|
|
|
|
|