update 优化 兼容企业微信 大小写返回不一致的奇葩问题
This commit is contained in:
+7
-2
@@ -79,10 +79,15 @@ 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");
|
||||||
|
}
|
||||||
|
if (userId == null) {
|
||||||
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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user