|
|
|
|
@ -9,18 +9,30 @@ package co.depsystem.app.service.Author.Impl;
@@ -9,18 +9,30 @@ package co.depsystem.app.service.Author.Impl;
|
|
|
|
|
|
|
|
|
|
import co.depsystem.app.api.Common.ResponseResult; |
|
|
|
|
import jakarta.annotation.Resource; |
|
|
|
|
import jakarta.servlet.ServletException; |
|
|
|
|
import jakarta.servlet.http.HttpServletRequest; |
|
|
|
|
import jakarta.servlet.http.HttpServletResponse; |
|
|
|
|
import org.springframework.security.core.AuthenticationException; |
|
|
|
|
import org.springframework.security.web.AuthenticationEntryPoint; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 认证服务 |
|
|
|
|
* @author adiao |
|
|
|
|
*/ |
|
|
|
|
@Service |
|
|
|
|
public class AuthorFilterImpl { |
|
|
|
|
public class AuthorFilterImpl implements AuthenticationEntryPoint { |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
public ResponseResult<Object> result; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 用户认证 |
|
|
|
|
* @param user User |
|
|
|
|
|