Jelajahi Sumber

单点登录调整

xy 5 hari lalu
induk
melakukan
e388d71af6

+ 3 - 3
tz-module-system/tz-module-system-biz/src/main/java/cn/start/tz/module/system/controller/admin/cas/CasController.java

@@ -92,11 +92,11 @@ public class CasController {
             // 1. 从 Session 中获取 CAS Assertion(由 CAS ValidationFilter 验证后存储)
             Assertion assertion = (Assertion) request.getSession().getAttribute("_const_cas_assertion_");
 
-            String username = "dexdev";
+            String username = "";
             if (assertion == null || assertion.getPrincipal() == null) {
                 log.error("[casCallback] CAS Assertion 为空,ticket 未通过验证" + assertion);
-                //response.sendError(401, "CAS ticket验证失败,请检查CAS服务器配置和网络连接");
-                //return;
+                response.sendError(401, "CAS ticket验证失败,请检查CAS服务器配置和网络连接");
+                return;
             }else{
                 // 2. 获取用户名
                 username = assertion.getPrincipal().getName();

+ 5 - 6
tz-module-system/tz-module-system-biz/src/main/resources/application-uat.yaml

@@ -187,15 +187,14 @@ feign:
 cas:
   # 单点登录URL
   #server-url-prefix: https://auth.gzsei.work/prod-api/protocols/cas20
-#  server-url-prefix: http://192.168.19.80/prod-api/protocols/cas20
+  server-url-prefix: http://192.168.19.80/prod-api/protocols/cas20
   # CAS 过滤器拦截的 URL 路径模式(只拦截后台管理系统,不影响移动端/小程序等)
   url-patterns: /admin-api/*
   # 忽略的地址
   ignore-url-list: /admin-api/system/auth/**,/admin-api/system/cas/**,/file/**,/tile/**,/actuator/**,/druid/**,/swagger-ui/**,/v3/api-docs/**,/webjars/**,/error
   # 认证成功后回调地址
-  front-url: http://192.168.19.165:40081
+  #front-url: http://192.168.19.165:40081
+  front-url: https://cyjw.gzsei.work
   # cas客户端地址
-  client-host-url: http://192.168.19.165:40081
-
-  # 应用秘钥
-  secret: Zk8qMjQwNDIwMjYwNzE0MzI2NTUZip
+  #client-host-url: http://192.168.19.165:40081
+  client-host-url: https://cyjw.gzsei.work