Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

修复企业微信OAuth2服务getAuthUserInfo字段大小写问题导致无法获取返回数据 #3208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,16 @@ public interface WxCpOAuth2Service {

/**
* <pre>
* 使用user_ticket获取成员详情.
* 使用user_ticket获取成员详情
*
* 文档地址:https://work.weixin.qq.com/api/doc#10028/%E4%BD%BF%E7%94%A8user_ticket%E8%8E%B7%E5%8F%96%E6%88%90%E5%91%98%E8%AF%A6%E6%83%85
* 文档地址:https://developer.work.weixin.qq.com/document/path/95833
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/getuserdetail?access_token=ACCESS_TOKEN
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/auth/getuserdetail?access_token=ACCESS_TOKEN
*
* 权限说明:
* 需要有对应应用的使用权限,且成员必须在授权应用的可见范围内。
* 注意: 原/cgi-bin/user/getuserdetail接口的url已变更为/cgi-bin/auth/getuserdetail,旧接口暂时还可以使用,但建议使用新接口
*
* 权限说明:需要有对应应用的使用权限,且成员必须在授权应用的可见范围内。
* 适用范围:企业内部开发、服务商代开发
* </pre>
*
* @param userTicket 成员票据
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ public WxCpOauth2UserInfo getAuthUserInfo(String code) throws WxErrorException {
JsonObject jo = GsonParser.parse(responseText);

return WxCpOauth2UserInfo.builder()
.userId(GsonHelper.getString(jo, "UserId"))
.openId(GsonHelper.getString(jo, "OpenId"))
.userId(GsonHelper.getString(jo, "userid"))
.openId(GsonHelper.getString(jo, "openid"))
.userTicket(GsonHelper.getString(jo, "user_ticket"))
.externalUserId(GsonHelper.getString(jo, "external_userid"))
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ interface OAuth2 {
/**
* The constant GET_USER_DETAIL.
*/
String GET_USER_DETAIL = "/cgi-bin/user/getuserdetail";
String GET_USER_DETAIL = "/cgi-bin/auth/getuserdetail";
/**
* The constant URL_OAUTH2_AUTHORIZE.
*/
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.