From d975263da74a8969f1517b142a5ff2f2d5173669 Mon Sep 17 00:00:00 2001 From: "youhong.ai" Date: Wed, 22 Nov 2023 11:18:00 +0800 Subject: [PATCH] =?UTF-8?q?ssotoken=E8=8E=B7=E5=8F=96=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../examples/ssotoken/SsoTokenJumpEcology.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/weaver/ebu7dev/examples/ssotoken/SsoTokenJumpEcology.java b/src/main/java/com/weaver/ebu7dev/examples/ssotoken/SsoTokenJumpEcology.java index 70b735a..d1a59ef 100644 --- a/src/main/java/com/weaver/ebu7dev/examples/ssotoken/SsoTokenJumpEcology.java +++ b/src/main/java/com/weaver/ebu7dev/examples/ssotoken/SsoTokenJumpEcology.java @@ -12,18 +12,19 @@ import cn.hutool.http.HttpRequest; public class SsoTokenJumpEcology { /** ecology方提供的appID */ - private static final String APP_ID = "NCCloud"; + private static final String APP_ID = "2beecb36-71ab-4af8-9762-484ee2cb449b"; 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") + .post(ecUrlHost + "/ssologin/getToken") + //.header("Content-Type", "application/x-www-form-urlencoded") + .form("appid", APP_ID) + .form("loginid", "sysadmin") .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"); + 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"); } }