Przeglądaj źródła

单点登陆修改

wangliang 3 lat temu
rodzic
commit
569aa87951

+ 14 - 14
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/WudaOpenApiController.java

@@ -116,20 +116,20 @@ public class WudaOpenApiController {
         response.sendRedirect(dictionaryConfig.sysDomain().getLoginAuthenUrl() + code);
     }
 
-    @ApiOperation(value = "cas用户鉴权测试接口")
-    @RequestMapping(value = "/user/authentication/test", method = RequestMethod.GET)
-    @ApiResponses({@ApiResponse(code = 200, message = "返回消息", response = Result.class)})
-    @Aac(auth = BOOL.FALSE)
-    public void userAuthenticationTest(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        String uid = "yz1";
-        UserAuthenticationDto userAuthenticationDto = new UserAuthenticationDto(uid, SystemConstant.getUuid());
-        WhuUserAuthCacheUtil.setAuthCode(userAuthenticationDto);
-        String pattern = "{0}{1}{2}";
-        String code = URLEncoder.encode(MessageFormat.format(pattern, userAuthenticationDto.getUid(), SignatureEntityTest.FIELD_JOINER, SignatureEntityTest.encrypt(userAuthenticationDto.getCode())), SystemConstant.CHARSET_NAME);
-        log.info("code:{}", code);
-        response.setHeader("Access-Control-Allow-Origin", "*");
-        response.sendRedirect(dictionaryConfig.sysDomain().getLoginAuthenUrl() + code);
-    }
+//    @ApiOperation(value = "cas用户鉴权测试接口")
+//    @RequestMapping(value = "/user/authentication/test", method = RequestMethod.GET)
+//    @ApiResponses({@ApiResponse(code = 200, message = "返回消息", response = Result.class)})
+//    @Aac(auth = BOOL.FALSE)
+//    public void userAuthenticationTest(HttpServletRequest request, HttpServletResponse response) throws IOException {
+//        String uid = "yz1";
+//        UserAuthenticationDto userAuthenticationDto = new UserAuthenticationDto(uid, SystemConstant.getUuid());
+//        WhuUserAuthCacheUtil.setAuthCode(userAuthenticationDto);
+//        String pattern = "{0}{1}{2}";
+//        String code = URLEncoder.encode(MessageFormat.format(pattern, userAuthenticationDto.getUid(), SignatureEntityTest.FIELD_JOINER, SignatureEntityTest.encrypt(userAuthenticationDto.getCode())), SystemConstant.CHARSET_NAME);
+//        log.info("code:{}", code);
+//        response.setHeader("Access-Control-Allow-Origin", "*");
+//        response.sendRedirect(dictionaryConfig.sysDomain().getLoginAuthenUrl() + code);
+//    }
 
     @ApiOperation(value = "cas用户临时授权登录接口")
     @RequestMapping(value = "/user/authentication/login", method = RequestMethod.POST)