提交 046aa0ff 作者: xiaowang

消息推送token验证

上级 a3d3533e
package com.mmc.csf.release.controller; package com.mmc.csf.release.controller;
import com.mmc.csf.common.util.web.ResultBody;
import com.mmc.csf.release.service.WxApiService; import com.mmc.csf.release.service.WxApiService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -26,9 +26,15 @@ public class WxApiController { ...@@ -26,9 +26,15 @@ public class WxApiController {
/** /**
* 正确响应微信发送的Token验证,注意 这里是 get请求 * 正确响应微信发送的Token验证,注意 这里是 get请求
*/ */
@GetMapping("/checkSignature") @PostMapping("/checkSignature")
@ApiOperation(value = "校验签名") @ApiOperation(value = "校验签名")
public String verifyUrl(@RequestParam Map<String, String> params) throws Exception { public String verifyUrl(Map<String, String> params) throws Exception {
return wxApiService.checkSignature(params); return wxApiService.checkSignature(params);
} }
@PostMapping("/mediaCheckAsync")
@ApiOperation(value = "媒体资源安全检查")
public ResultBody mediaCheckAsync(String mediaUrl) {
return wxApiService.mediaCheckAsync("ohQPS5Ca4K6mY4Eju6Vsev096SxM", mediaUrl);
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论