|
@@ -10,6 +10,7 @@ import java.security.spec.InvalidKeySpecException;
|
|
|
import java.security.spec.X509EncodedKeySpec;
|
|
|
import java.util.*;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ruoyi.common.utils.MessageUtils;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.framework.manager.AsyncManager;
|
|
@@ -200,9 +201,12 @@ public class SysLoginController {
|
|
|
ajax = exchange.getBody();
|
|
|
|
|
|
// TODO: 进行jwt解析
|
|
|
- // ajax对象取id_token
|
|
|
- // String id_token = ajax.get("id_token").toString();
|
|
|
- // 解析id_token 获取cn字段(用户名)
|
|
|
+// String idToken = ajax.get("id_token").toString();
|
|
|
+// idToken = idToken.substring(idToken.indexOf(".") + 1, idToken.lastIndexOf("."));
|
|
|
+// byte[] decodeBytes = java.util.Base64.getDecoder().decode(idToken);
|
|
|
+// String decodeStr = new String(decodeBytes,StandardCharsets.UTF_8);
|
|
|
+// JSONObject jsonObject = JSONObject.parseObject(decodeStr);
|
|
|
+// String cn = jsonObject.get("aud").toString();
|
|
|
|
|
|
// TODO: 系统登录 获取系统token
|
|
|
String cn = "ZHANGL49";
|
|
@@ -216,3 +220,5 @@ public class SysLoginController {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|