修改项目结构,添加ssoTOken获取示例
parent
ebf3a791c2
commit
0f20b6b3b8
|
@ -1,4 +1,4 @@
|
|||
package environment;
|
||||
package com.weaver.ebu7dev.examples.registertoken;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.crypto.asymmetric.KeyType;
|
|
@ -0,0 +1,29 @@
|
|||
package com.weaver.ebu7dev.examples.ssotoken;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
|
||||
/**
|
||||
* <h1>ssoToken跳转</h1>
|
||||
*
|
||||
* <p>create: 2023/11/21 18:03</p>
|
||||
*
|
||||
* @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");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue