类 JsonExceptionAuthenticationEntryPoint
java.lang.Object
org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint
io.github.mangocrisp.spring.taybct.auth.exception.JsonExceptionAuthenticationEntryPoint
- 所有已实现的接口:
org.springframework.beans.factory.InitializingBean
,org.springframework.security.web.AuthenticationEntryPoint
public class JsonExceptionAuthenticationEntryPoint
extends org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint
可以返回 JSON 到前端的异常处理器
-
字段概要
字段修饰符和类型字段说明private final io.github.mangocrisp.spring.taybct.tool.core.exception.handler.IGlobalExceptionReporter
private final io.github.mangocrisp.spring.taybct.tool.core.exception.handler.IGlobalPrinter
-
构造器概要
构造器构造器说明JsonExceptionAuthenticationEntryPoint
(String loginFormUrl, io.github.mangocrisp.spring.taybct.tool.core.exception.handler.IGlobalExceptionReporter globalExceptionReporter, io.github.mangocrisp.spring.taybct.tool.core.exception.handler.IGlobalPrinter globalPrinter) -
方法概要
修饰符和类型方法说明protected String
buildRedirectUrlToLoginPage
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException) void
commence
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException) 从类继承的方法 org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint
afterPropertiesSet, buildHttpsRedirectUrlForRequest, determineUrlToUseForThisRequest, getLoginFormUrl, getPortMapper, getPortResolver, isForceHttps, isUseForward, setForceHttps, setPortMapper, setPortResolver, setUseForward
-
字段详细资料
-
globalExceptionReporter
private final io.github.mangocrisp.spring.taybct.tool.core.exception.handler.IGlobalExceptionReporter globalExceptionReporter -
globalPrinter
private final io.github.mangocrisp.spring.taybct.tool.core.exception.handler.IGlobalPrinter globalPrinter
-
-
构造器详细资料
-
JsonExceptionAuthenticationEntryPoint
public JsonExceptionAuthenticationEntryPoint(String loginFormUrl, io.github.mangocrisp.spring.taybct.tool.core.exception.handler.IGlobalExceptionReporter globalExceptionReporter, io.github.mangocrisp.spring.taybct.tool.core.exception.handler.IGlobalPrinter globalPrinter) - 参数:
loginFormUrl
- URL where the login page can be found. Should either be relative to the web-app context path (include a leading/
) or an absolute URL.globalExceptionReporter
- 异常记录globalPrinter
- 异常输出
-
-
方法详细资料
-
commence
public void commence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException) throws IOException, jakarta.servlet.ServletException - 指定者:
commence
在接口中org.springframework.security.web.AuthenticationEntryPoint
- 覆盖:
commence
在类中org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint
- 抛出:
IOException
jakarta.servlet.ServletException
-
buildRedirectUrlToLoginPage
protected String buildRedirectUrlToLoginPage(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException) - 覆盖:
buildRedirectUrlToLoginPage
在类中org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint
-