类 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

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • 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