| | |
| | | package com.ruoyi.framework.security.handle;
|
| | |
|
| | | import java.io.IOException;
|
| | | import javax.servlet.ServletException;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.context.annotation.Configuration;
|
| | | import org.springframework.security.core.Authentication;
|
| | | import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
|
| | | import com.alibaba.fastjson2.JSON;
|
| | | import com.ruoyi.common.constant.Constants;
|
| | | import com.ruoyi.common.utils.ServletUtils;
|
| | |
| | | import com.ruoyi.framework.security.LoginUser;
|
| | | import com.ruoyi.framework.security.service.TokenService;
|
| | | import com.ruoyi.framework.web.domain.AjaxResult;
|
| | | import jakarta.servlet.ServletException;
|
| | | import jakarta.servlet.http.HttpServletRequest;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.context.annotation.Configuration;
|
| | | import org.springframework.security.core.Authentication;
|
| | | import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
|
| | |
|
| | | import java.io.IOException;
|
| | |
|
| | | /**
|
| | | * 自定义退出处理类 返回成功
|
| | | * |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | @Configuration
|
| | | @RequiredArgsConstructor
|
| | | public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler
|
| | | {
|
| | | @Autowired
|
| | | private TokenService tokenService;
|
| | | private final TokenService tokenService;
|
| | |
|
| | | /**
|
| | | * 退出处理
|
| | | * |
| | | *
|
| | | * @return
|
| | | */
|
| | | @Override
|