微信第三方平台公众号授权流程2—推送component_verify_ticket协议

公众号授权给第三方平台的技术实现流程概览

:时序图

推送component_verify_ticket协议

在第三方平台创建审核通过后,微信服务器会向其“授权事件接收URL”每隔10分钟定时推送component_verify_ticket。第三方平台方在收到ticket推送后也需进行解密),接收到后必须直接返回字符串success。
web层代码如下:

/**
	 * 授权事件接收
	 * 
	 * @param request
	 * @param response
	 */
	@RequestMapping(value = "/wechat/auth")
	@ResponseBody
	public void acceptAuthorizeEvent(HttpServletRequest request, HttpServletResponse response)
			throws IOException, AesException {
		response.getWriter().print("success");
		WxThirdPartyAuthUtil.processAuthorizeEvent(request);

	}

WxThirdPartyAuthUtil类的相关代码:

/**
	 * 处理授权事件的推送
	 * 
	 * @param request
	 * @throws IOException
	 * @throws AesException
	 * @throws DocumentException
	 */
	public static void processAuthorizeEvent(HttpServletRequest request) throws IOExcep
评论 22
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值