From b8e8d5a566438cded4fd1d1f7a4224127ed56c65 Mon Sep 17 00:00:00 2001 From: fanwenjie Date: Tue, 21 Jun 2022 11:46:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=80=E5=87=BA=E9=87=8D=E5=AE=9A?= =?UTF-8?q?=E5=90=91=E5=9B=9E=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/maxkey/web/contorller/LogoutEndpoint.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/LogoutEndpoint.java b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/LogoutEndpoint.java index af1840fc..78483382 100644 --- a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/LogoutEndpoint.java +++ b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/LogoutEndpoint.java @@ -28,10 +28,11 @@ import org.maxkey.authz.singlelogout.SamlSingleLogout; import org.maxkey.authz.singlelogout.DefaultSingleLogout; import org.maxkey.authz.singlelogout.LogoutType; import org.maxkey.authz.singlelogout.SingleLogout; +import org.maxkey.configuration.ApplicationConfig; import org.maxkey.constants.ConstsProtocols; -import org.maxkey.entity.Message; import org.maxkey.entity.UserInfo; import org.maxkey.entity.apps.Apps; +import org.maxkey.web.WebContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -41,6 +42,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.web.servlet.ModelAndView; @Tag(name = "1-3-单点注销接口文档模块") @Controller @@ -49,10 +51,12 @@ public class LogoutEndpoint { @Autowired protected SessionManager sessionManager; - + @Autowired + ApplicationConfig applicationConfig; + @Operation(summary = "单点注销接口", description = "reLoginUrl跳转地址",method="GET") @RequestMapping(value={"/logout"}, produces = {MediaType.APPLICATION_JSON_VALUE}) - public ResponseEntity logout(@CurrentUser UserInfo currentUser){ + public ModelAndView logout(@CurrentUser UserInfo currentUser){ //if logined in have onlineTicket ,need remove or logout back String sessionId = currentUser.getSessionId(); Session session = sessionManager.get(sessionId); -- GitLab