diff --git a/src/main/java/com.weaver.ebu7dev/Main.java b/src/main/java/com/Main.java similarity index 100% rename from src/main/java/com.weaver.ebu7dev/Main.java rename to src/main/java/com/Main.java diff --git a/src/main/java/com.weaver.ebu7dev/examples/registertoken/RegisterEcologyAndTokenUtil.java b/src/main/java/com/weaver/ebu7dev/examples/registertoken/RegisterEcologyAndTokenUtil.java similarity index 98% rename from src/main/java/com.weaver.ebu7dev/examples/registertoken/RegisterEcologyAndTokenUtil.java rename to src/main/java/com/weaver/ebu7dev/examples/registertoken/RegisterEcologyAndTokenUtil.java index 7cea7a0..f4d6aaa 100644 --- a/src/main/java/com.weaver.ebu7dev/examples/registertoken/RegisterEcologyAndTokenUtil.java +++ b/src/main/java/com/weaver/ebu7dev/examples/registertoken/RegisterEcologyAndTokenUtil.java @@ -1,4 +1,4 @@ -package environment; +package com.weaver.ebu7dev.examples.registertoken; import cn.hutool.core.util.StrUtil; import cn.hutool.crypto.asymmetric.KeyType; diff --git a/src/main/java/com/weaver/ebu7dev/examples/ssotoken/SsoTokenJumpEcology.java b/src/main/java/com/weaver/ebu7dev/examples/ssotoken/SsoTokenJumpEcology.java new file mode 100644 index 0000000..70b735a --- /dev/null +++ b/src/main/java/com/weaver/ebu7dev/examples/ssotoken/SsoTokenJumpEcology.java @@ -0,0 +1,29 @@ +package com.weaver.ebu7dev.examples.ssotoken; + +import cn.hutool.http.HttpRequest; + +/** + *

ssoToken跳转

+ * + *

create: 2023/11/21 18:03

+ * + * @author youHong.ai + */ +public class SsoTokenJumpEcology { + + /** ecology方提供的appID */ + private static final String APP_ID = "NCCloud"; + + + public static void main(String[] args) { + // 注意这里是对应ECOLOGY 系统的地址数据信息 + String ecUrlHost = "http://10.86.0.248"; + String ssoToken = HttpRequest + .get(ecUrlHost + "/ssologin/checkToken") + .header("appid", APP_ID) + .header("loginid", "1") + .execute().body(); + System.out.println("ecology ssoToken is :" + ssoToken); + System.out.println("you can try jump to this url: "+ "http://10.86.0.248/spa/cube/index.html?ssoToken=" + ssoToken + "#/main/cube/search?customid=2000017&billid=278,279"); + } +}