Browse Source

修改---退出登录,添加日志信息。

zhouhaijun 3 months ago
parent
commit
167868a99a
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/main/java/com/bootdo/system/controller/LoginController.java

+ 6 - 2
src/main/java/com/bootdo/system/controller/LoginController.java

@@ -230,6 +230,8 @@ public class LoginController extends BaseController {
 
     @GetMapping("/logout")
     String logout() {
+        logger.error("logout======in==="+logoutRedirectUrl);
+
         //获取当前登录账号信息
         UserDO currUser = ShiroUtils.getUser();
 
@@ -239,17 +241,19 @@ public class LoginController extends BaseController {
         } catch (Exception e){
             e.printStackTrace();
         }
-
+        logger.error("logout======begin==="+logoutRedirectUrl);
         if(ObjectUtils.isEmpty(logoutRedirectUrl)){
+            logger.error("logout======not null==="+logoutRedirectUrl);
             //返回第三方退出登录接口
             //回调地址示例:https://testmicrosrv.scca.com.cn:9668/session/end?client_id=f104472f-02f4-6ab6-f6dc&access_token=HRMpcEUueorxSGQccNolRB2vkpaxnWHGvQonRtnoKEr3Z7KQthcUFz8jdaSD&logout_redirect_uri=http://124.70.58.209:19087/login
             String logoutRedirectBackUrl = permAuthPrefix + "/session/end" +
                     "?client_id=" + this.uniIdentAuthAppId +
                     "&access_token=" + redisUtil.hget(Constants.USERNAME_ACCESS_TOKEN, currUser.getUsername()) +
                     "&logout_redirect_uri=" + this.logoutRedirectUrl;
-            logger.error("logoutRedirectBackUrl==============="+logoutRedirectBackUrl);
+            logger.error("logoutRedirectBackUrl========end======="+logoutRedirectBackUrl);
             return "redirect:" + logoutRedirectBackUrl;
         }else {
+            logger.error("logout======is null==="+logoutRedirectUrl);
             return "redirect:" +  loginUrl;
         }