Browse Source

update tt

master
xhxu 3 years ago
parent
commit
07bc73edc3
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      mlToutiaoOpen/src/main/java/com/iformall/controller/TtCalllbackController.java

+ 7
- 7
mlToutiaoOpen/src/main/java/com/iformall/controller/TtCalllbackController.java View File

@@ -60,16 +60,16 @@ public class TtCalllbackController extends BaseController {
@PostMapping(value = "/notify")
@ApiOperation("接收ticket回调")
@ResponseBody
public String receiveTicket(HttpServletRequest request) throws IOException {
public String receiveTicket(@RequestBody Map<String, String> params) throws IOException {
logger.info("[" + getIpAddr() + "]接收微信回调 /ttOpen/notify");

String nonce = request.getParameter("Nonce");
String timestamp = request.getParameter("TimeStamp");
// String signature = request.getParameter("signature");
String encrypt = request.getParameter("Encrypt");
String msgSignature = request.getParameter("MsgSignature");
String nonce = params.get("Nonce");
String timestamp = params.get("TimeStamp");
// String signature = params.get("signature");
String encrypt = params.get("Encrypt");
String msgSignature = params.get("MsgSignature");

if (openService.getTtOpenComponentService().checkSignature(timestamp, nonce, encrypt, msgSignature)) {
if (!openService.getTtOpenComponentService().checkSignature(timestamp, nonce, encrypt, msgSignature)) {
throw new IllegalArgumentException("非法请求,可能属于伪造的请求!");
}
// aes加密的消息, 解密


Loading…
Cancel
Save