类 JsonAuthenticationEntryPoint

java.lang.Object
cn.bbwres.biscuit.security.oauth2.web.JsonAuthenticationEntryPoint
所有已实现的接口:
org.springframework.security.web.AuthenticationEntryPoint

public class JsonAuthenticationEntryPoint extends Object implements org.springframework.security.web.AuthenticationEntryPoint
认证失败时返回json数据
作者:
zhanglinfeng
  • 构造器详细资料

    • JsonAuthenticationEntryPoint

      public JsonAuthenticationEntryPoint()
  • 方法详细资料

    • 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
      Commences an authentication scheme.

      ExceptionTranslationFilter will populate the HttpSession attribute named AbstractAuthenticationProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_KEY with the requested target URL before calling this method.

      Implementations should modify the headers on the ServletResponse as necessary to commence the authentication process.

      指定者:
      commence 在接口中 org.springframework.security.web.AuthenticationEntryPoint
      参数:
      request - that resulted in an AuthenticationException
      response - so that the user agent can begin authentication
      authException - that caused the invocation
      抛出:
      IOException
      jakarta.servlet.ServletException