mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-17 17:15:28 +08:00
Pre Merge pull request !875 from ADVISORY/agent/wecom-userid-case-compat
This commit is contained in:
commit
42677cebcb
@ -53,10 +53,16 @@ public abstract class AbstractAuthWeChatEnterpriseRequest extends AuthDefaultReq
|
|||||||
|
|
||||||
// 返回 OpenId 或其他,均代表非当前企业用户,不支持
|
// 返回 OpenId 或其他,均代表非当前企业用户,不支持
|
||||||
// https://github.com/justauth/JustAuth/issues/227 修复bug
|
// https://github.com/justauth/JustAuth/issues/227 修复bug
|
||||||
if (!object.containsKey("userid")) {
|
String userId = null;
|
||||||
|
if (object.containsKey("userid")) {
|
||||||
|
userId = object.getString("userid");
|
||||||
|
} else if (object.containsKey("UserId")) {
|
||||||
|
userId = object.getString("UserId");
|
||||||
|
}
|
||||||
|
// 如果两种 key 都不存在,则 userId 仍然为 null,此时抛出异常
|
||||||
|
if (StringUtils.isEmpty(userId)) {
|
||||||
throw new AuthException(AuthResponseStatus.UNIDENTIFIED_PLATFORM, source);
|
throw new AuthException(AuthResponseStatus.UNIDENTIFIED_PLATFORM, source);
|
||||||
}
|
}
|
||||||
String userId = object.getString("userid");
|
|
||||||
String userTicket = object.getString("user_ticket");
|
String userTicket = object.getString("user_ticket");
|
||||||
JSONObject userDetail = getUserDetail(authToken.getAccessToken(), userId, userTicket);
|
JSONObject userDetail = getUserDetail(authToken.getAccessToken(), userId, userTicket);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user