|
@@ -69,6 +69,7 @@ public class WxMsgController {
|
|
|
*/
|
|
|
@RequestMapping(value="/checkToken",method= RequestMethod.GET)
|
|
|
public void weChat(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
|
|
+ log.info("校验wxToken 开始");
|
|
|
boolean isGet = request.getMethod().toLowerCase().equals("get");
|
|
|
if (isGet) {
|
|
|
// 微信加密签名
|
|
@@ -79,6 +80,7 @@ public class WxMsgController {
|
|
|
String nonce = request.getParameter("nonce");
|
|
|
// 随机字符串
|
|
|
String echostr = request.getParameter("echostr");
|
|
|
+ log.info("校验wxToken signature: " + signature);
|
|
|
// 通过检验signature对请求进行校验,若校验成功则原样返回echostr,表示接入成功,否则接入失败
|
|
|
if (signature != null && CheckoutUtil.checkSignature(signature, timestamp, nonce)) {
|
|
|
try {
|