类 OAuth2FormLoginAuthenticationFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
所有已实现的接口:
javax.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.EnvironmentAware, org.springframework.context.MessageSourceAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware

public class OAuth2FormLoginAuthenticationFilter extends UsernamePasswordAuthenticationFilter

Description: OAuth2 表单登录过滤器

作者:
: gengwei.zheng
Date:
: 2022/4/12 11:08
  • 构造器详细资料

    • OAuth2FormLoginAuthenticationFilter

      public OAuth2FormLoginAuthenticationFilter()
    • OAuth2FormLoginAuthenticationFilter

      public OAuth2FormLoginAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager)
  • 方法详细资料

    • attemptAuthentication

      public org.springframework.security.core.Authentication attemptAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws org.springframework.security.core.AuthenticationException
      覆盖:
      attemptAuthentication 在类中 UsernamePasswordAuthenticationFilter
      抛出:
      org.springframework.security.core.AuthenticationException
    • setPostOnly

      public void setPostOnly(boolean postOnly)
      覆盖:
      setPostOnly 在类中 UsernamePasswordAuthenticationFilter
    • unsuccessfulAuthentication

      protected void unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException failed) throws IOException, javax.servlet.ServletException
      重写该方法,避免在日志Debug级别会输出错误信息的问题。
      覆盖:
      unsuccessfulAuthentication 在类中 AbstractAuthenticationProcessingFilter
      参数:
      request - 请求
      response - 响应
      failed - 失败内容
      抛出:
      IOException - IOException
      javax.servlet.ServletException - ServletException