mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-05-06 05:37:48 +08:00
#701 企业微信 网页授权登录 使用snsapi_userinfo、snsapi_privateinfo时需要使用agentid
This commit is contained in:
parent
8c63f13387
commit
a24b74603f
@ -48,7 +48,12 @@ public class WxCpOAuth2ServiceImpl implements WxCpOAuth2Service {
|
||||
url.append("&redirect_uri=").append(URIUtil.encodeURIComponent(redirectUri));
|
||||
url.append("&response_type=code");
|
||||
url.append("&scope=").append(scope);
|
||||
|
||||
|
||||
if (WxConsts.OAuth2Scope.SNSAPI_PRIVATEINFO.equals(scope)
|
||||
|| WxConsts.OAuth2Scope.SNSAPI_USERINFO.equals(scope)) {
|
||||
url.append("&agentid=").append(this.mainService.getWxCpConfigStorage().getAgentId());
|
||||
}
|
||||
|
||||
if (state != null) {
|
||||
url.append("&state=").append(state);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user