|
|
|
@@ -34,6 +34,10 @@ public class GitServiceImpl implements GitService { |
|
|
|
private Integer redisPort; |
|
|
|
@Value("${git.endpoint}") |
|
|
|
String gitendpoint; |
|
|
|
@Value("${git.clientId}") |
|
|
|
String clientId; |
|
|
|
@Value("${git.clientSecret}") |
|
|
|
String clientSecret; |
|
|
|
@Resource |
|
|
|
private NewHttpUtils httpUtils; |
|
|
|
private static final Logger log = LoggerFactory.getLogger(GitServiceImpl.class); |
|
|
|
@@ -45,8 +49,8 @@ public class GitServiceImpl implements GitService { |
|
|
|
params.put("grant_type", "password"); |
|
|
|
params.put("username", username); |
|
|
|
params.put("password", decrypt(password)); |
|
|
|
params.put("client_id", "jEdGwrIJixCUIJM9vj2MwA6zmoTVhUdXxiSAaaCiXwA"); |
|
|
|
params.put("client_secret", "L3wBKTNnRo-wPen7bxR3F1myCvtVDgpWa6MnpfyWeJE"); |
|
|
|
params.put("client_id", clientId); |
|
|
|
params.put("client_secret", clientSecret); |
|
|
|
try { |
|
|
|
// 发送POST请求 |
|
|
|
String req = httpUtils.sendPost(gitendpoint + "/oauth/token", null, JsonUtils.mapToJson(params)); |
|
|
|
|