| | |
| | | package com.panzhihua.auth.handel; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.ResultUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.security.core.AuthenticationException; |
| | | import org.springframework.security.web.AuthenticationEntryPoint; |
| | | import org.springframework.stereotype.Component; |
| | | import java.io.IOException; |
| | | |
| | | import javax.servlet.ServletException; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | |
| | | import org.springframework.security.core.AuthenticationException; |
| | | import org.springframework.security.web.AuthenticationEntryPoint; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.ResultUtil; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | public class AjaxAuthenticationEntryPoint implements AuthenticationEntryPoint { |
| | | |
| | | @Override |
| | | public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException { |
| | | log.error("错误信息【{}】",e.getMessage()); |
| | | ResultUtil.responseJson(httpServletResponse,R.fail(e.getMessage())); |
| | | public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, |
| | | AuthenticationException e) throws IOException, ServletException { |
| | | log.error("错误信息【{}】", e.getMessage()); |
| | | ResultUtil.responseJson(httpServletResponse, R.fail(e.getMessage())); |
| | | } |
| | | } |