测试修改
parent
d975263da7
commit
ff1898af99
|
@ -53,6 +53,7 @@ public class RegisterEcologyAndTokenUtil {
|
||||||
String data = HttpRequest
|
String data = HttpRequest
|
||||||
.get(ecUrlHost + "/api/hrm/organization/getCompanyFormField")
|
.get(ecUrlHost + "/api/hrm/organization/getCompanyFormField")
|
||||||
.header("appid", APP_ID)
|
.header("appid", APP_ID)
|
||||||
|
.header("Content-Type","application/x-www-form-urlencoded;charset=utf-8")
|
||||||
.header("token", token)
|
.header("token", token)
|
||||||
.header("userid", encryptUserid)
|
.header("userid", encryptUserid)
|
||||||
.execute().body();
|
.execute().body();
|
||||||
|
@ -82,6 +83,7 @@ public class RegisterEcologyAndTokenUtil {
|
||||||
String data = HttpRequest.post(ecUrlHost + "/api/ec/dev/auth/regist")
|
String data = HttpRequest.post(ecUrlHost + "/api/ec/dev/auth/regist")
|
||||||
.header("appid", APP_ID)
|
.header("appid", APP_ID)
|
||||||
.header("cpk", publicKey)
|
.header("cpk", publicKey)
|
||||||
|
.header("Content-Type","application/x-www-form-urlencoded;charset=utf-8")
|
||||||
.timeout(2000)
|
.timeout(2000)
|
||||||
.execute().body();
|
.execute().body();
|
||||||
Map<String, Object> datas = JSONUtil.parseObj(data);
|
Map<String, Object> datas = JSONUtil.parseObj(data);
|
||||||
|
@ -117,6 +119,7 @@ public class RegisterEcologyAndTokenUtil {
|
||||||
String encryptSecret = rsa.encryptBase64(secret, StandardCharsets.UTF_8, KeyType.PublicKey);
|
String encryptSecret = rsa.encryptBase64(secret, StandardCharsets.UTF_8, KeyType.PublicKey);
|
||||||
String data = HttpRequest.post(ecUrlHost + "/api/ec/dev/auth/applytoken")
|
String data = HttpRequest.post(ecUrlHost + "/api/ec/dev/auth/applytoken")
|
||||||
.header("appid", APP_ID)
|
.header("appid", APP_ID)
|
||||||
|
.header("Content-Type","application/x-www-form-urlencoded;charset=utf-8")
|
||||||
.header("secret", encryptSecret)
|
.header("secret", encryptSecret)
|
||||||
.header("time", "3600")
|
.header("time", "3600")
|
||||||
.execute().body();
|
.execute().body();
|
||||||
|
|
|
@ -12,7 +12,7 @@ import cn.hutool.http.HttpRequest;
|
||||||
public class SsoTokenJumpEcology {
|
public class SsoTokenJumpEcology {
|
||||||
|
|
||||||
/** ecology方提供的appID */
|
/** ecology方提供的appID */
|
||||||
private static final String APP_ID = "2beecb36-71ab-4af8-9762-484ee2cb449b";
|
private static final String APP_ID = "1e18329f-820f-11ee-b7a0-cc208c8416bc";
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
@ -20,6 +20,7 @@ public class SsoTokenJumpEcology {
|
||||||
String ecUrlHost = "http://10.86.0.248";
|
String ecUrlHost = "http://10.86.0.248";
|
||||||
String ssoToken = HttpRequest
|
String ssoToken = HttpRequest
|
||||||
.post(ecUrlHost + "/ssologin/getToken")
|
.post(ecUrlHost + "/ssologin/getToken")
|
||||||
|
.header("Content-Type","application/x-www-form-urlencoded;charset=utf-8")
|
||||||
//.header("Content-Type", "application/x-www-form-urlencoded")
|
//.header("Content-Type", "application/x-www-form-urlencoded")
|
||||||
.form("appid", APP_ID)
|
.form("appid", APP_ID)
|
||||||
.form("loginid", "sysadmin")
|
.form("loginid", "sysadmin")
|
||||||
|
|
Loading…
Reference in New Issue