类 OAuth2FormLoginAuthenticationFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
cn.herodotus.engine.oauth2.authentication.form.OAuth2FormLoginAuthenticationFilter
- 所有已实现的接口:
jakarta.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 org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
Description: OAuth2 表单登录过滤器
- 作者:
- : gengwei.zheng
- Date:
- : 2022/4/12 11:08
-
字段概要
从类继承的字段 org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
SPRING_SECURITY_FORM_PASSWORD_KEY, SPRING_SECURITY_FORM_USERNAME_KEY从类继承的字段 org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
authenticationDetailsSource, eventPublisher, messages从类继承的字段 org.springframework.web.filter.GenericFilterBean
logger -
构造器概要
构造器构造器说明OAuth2FormLoginAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager) -
方法概要
修饰符和类型方法说明org.springframework.security.core.AuthenticationattemptAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) voidsetPostOnly(boolean postOnly) protected voidunsuccessfulAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException failed) 重写该方法,避免在日志Debug级别会输出错误信息的问题。从类继承的方法 org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
getPasswordParameter, getUsernameParameter, obtainPassword, obtainUsername, setDetails, setPasswordParameter, setUsernameParameter从类继承的方法 org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
afterPropertiesSet, doFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getRememberMeServices, getSuccessHandler, requiresAuthentication, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setContinueChainBeforeSuccessfulAuthentication, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSecurityContextHolderStrategy, setSecurityContextRepository, setSessionAuthenticationStrategy, successfulAuthentication从类继承的方法 org.springframework.web.filter.GenericFilterBean
addRequiredProperty, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
构造器详细资料
-
OAuth2FormLoginAuthenticationFilter
public OAuth2FormLoginAuthenticationFilter() -
OAuth2FormLoginAuthenticationFilter
public OAuth2FormLoginAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager)
-
-
方法详细资料
-
attemptAuthentication
public org.springframework.security.core.Authentication attemptAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws org.springframework.security.core.AuthenticationException - 覆盖:
attemptAuthentication在类中org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter- 抛出:
org.springframework.security.core.AuthenticationException
-
setPostOnly
public void setPostOnly(boolean postOnly) - 覆盖:
setPostOnly在类中org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
-
unsuccessfulAuthentication
protected void unsuccessfulAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException failed) throws IOException, jakarta.servlet.ServletException 重写该方法,避免在日志Debug级别会输出错误信息的问题。- 覆盖:
unsuccessfulAuthentication在类中org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter- 参数:
request- 请求response- 响应failed- 失败内容- 抛出:
IOException- IOExceptionjakarta.servlet.ServletException- ServletException
-