/*
* 微信公众平台授权登录
*/
@RequestMapping(value = "/wxLogin", method = RequestMethod.GET)
public String wxLogin(HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException{
String myPublicDomain = "http://19516980.ngrok.io";//内网映射域名,使用ngrok
// String backUrl = myPublicDomain + "/wxCallBack";
/* 在确保微信公众账号拥有授权作用域(scope参数)的权限的前提下(服务号获得高级接口后,默认拥有scope参数中的snsapi_base和snsapi_userinfo)
* ,引导关注者打开如下页面:
* https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
*
* 尤其注意:
* 由于授权操作安全等级较高,所以在发起授权请求时,微信会对授权链接做正则强匹配校验,
* 如果链接的参数顺序不对,授权页面将无法正常访问
* 跳转回调redirect_uri,应当使用
* 微信公众平台授权登录
*/
@RequestMapping(value = "/wxLogin", method = RequestMethod.GET)
public String wxLogin(HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException{
String myPublicDomain = "http://19516980.ngrok.io";//内网映射域名,使用ngrok
// String backUrl = myPublicDomain + "/wxCallBack";
/* 在确保微信公众账号拥有授权作用域(scope参数)的权限的前提下(服务号获得高级接口后,默认拥有scope参数中的snsapi_base和snsapi_userinfo)
* ,引导关注者打开如下页面:
* https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
*
* 尤其注意:
* 由于授权操作安全等级较高,所以在发起授权请求时,微信会对授权链接做正则强匹配校验,
* 如果链接的参数顺序不对,授权页面将无法正常访问
* 跳转回调redirect_uri,应当使用