处理微信公众号state问题
This commit is contained in:
parent
2625a30ec3
commit
46c30081c0
@ -121,7 +121,7 @@ public class WechatOfficialAccountManager {
|
|||||||
* @param session
|
* @param session
|
||||||
*/
|
*/
|
||||||
public void setUserAccessToken(String code, String state, HttpSession session) throws Exception {
|
public void setUserAccessToken(String code, String state, HttpSession session) throws Exception {
|
||||||
if (StringUtils.equals(state, wechatOfficialAccountProperties.getAuthorize().getState())) {
|
if (StringUtils.startsWith(state, wechatOfficialAccountProperties.getAuthorize().getState())) {
|
||||||
WechatOfficialAccountAccessTokenForUser wechatOfficialAccountAccessTokenForUser = getUserAccessToken(code);
|
WechatOfficialAccountAccessTokenForUser wechatOfficialAccountAccessTokenForUser = getUserAccessToken(code);
|
||||||
WechatOfficialAccountUserInfo wechatOfficialAccountUserInfo = getUserInfo(wechatOfficialAccountAccessTokenForUser.getAccess_token(), wechatOfficialAccountAccessTokenForUser.getOpenid());
|
WechatOfficialAccountUserInfo wechatOfficialAccountUserInfo = getUserInfo(wechatOfficialAccountAccessTokenForUser.getAccess_token(), wechatOfficialAccountAccessTokenForUser.getOpenid());
|
||||||
WechatOfficialAccountUser wechatOfficialAccountUser = new WechatOfficialAccountUser();
|
WechatOfficialAccountUser wechatOfficialAccountUser = new WechatOfficialAccountUser();
|
||||||
|
Loading…
Reference in New Issue
Block a user