|
|
|
@@ -81,7 +81,7 @@ public class GitServiceImpl implements GitService { |
|
|
|
token = jedis.get(ci4sUsername + "_gitToken"); |
|
|
|
} else { |
|
|
|
try { |
|
|
|
Map userInfo = getUserInfo(); |
|
|
|
Map userInfo = getUserInfo(token); |
|
|
|
if (userInfo == null || (userInfo.get("status") != null && 401 == (Integer) userInfo.get("status"))) { |
|
|
|
login(gitLinkUsername, gitLinkPassword); |
|
|
|
token = jedis.get(ci4sUsername + "_gitToken"); |
|
|
|
@@ -152,8 +152,7 @@ public class GitServiceImpl implements GitService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Map getUserInfo() throws Exception { |
|
|
|
String token = this.checkoutToken(); |
|
|
|
public Map getUserInfo(String token) throws Exception { |
|
|
|
String userReq = HttpUtils.sendGetWithToken("https://www.gitlink.org.cn/api/users/get_user_info.json",null, token); |
|
|
|
if (StringUtils.isEmpty(userReq)){ |
|
|
|
return null; |
|
|
|
|