Class FlowableTokenAuthenticationFilter
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- org.springframework.web.filter.OncePerRequestFilter
-
- com.flowable.core.spring.security.token.FlowableTokenAuthenticationFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
,Aware
,BeanNameAware
,DisposableBean
,InitializingBean
,ApplicationEventPublisherAware
,EnvironmentAware
,EnvironmentCapable
,ServletContextAware
public class FlowableTokenAuthenticationFilter extends OncePerRequestFilter implements ApplicationEventPublisherAware
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?>
authenticationDetailsSource
protected AuthenticationFailureHandler
authenticationFailureHandler
protected AuthenticationManager
authenticationManager
protected ApplicationEventPublisher
eventPublisher
protected String
tokenRequestParameter
-
Fields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIX
-
Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger
-
-
Constructor Summary
Constructors Constructor Description FlowableTokenAuthenticationFilter(AuthenticationManager authenticationManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)
void
setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
void
setAuthenticationDetailsSource(AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
void
setAuthenticationFailureHandler(AuthenticationFailureHandler authenticationFailureHandler)
void
setTokenRequestParameter(String tokenRequestParameter)
protected void
successfulAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Authentication authResult)
protected void
unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationException failed)
-
Methods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
-
Methods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
-
-
-
Field Detail
-
authenticationManager
protected final AuthenticationManager authenticationManager
-
eventPublisher
protected ApplicationEventPublisher eventPublisher
-
tokenRequestParameter
protected String tokenRequestParameter
-
authenticationDetailsSource
protected AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource
-
authenticationFailureHandler
protected AuthenticationFailureHandler authenticationFailureHandler
-
-
Constructor Detail
-
FlowableTokenAuthenticationFilter
public FlowableTokenAuthenticationFilter(AuthenticationManager authenticationManager)
-
-
Method Detail
-
doFilterInternal
protected void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) throws javax.servlet.ServletException, IOException
- Specified by:
doFilterInternal
in classOncePerRequestFilter
- Throws:
javax.servlet.ServletException
IOException
-
successfulAuthentication
protected void successfulAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Authentication authResult) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
unsuccessfulAuthentication
protected void unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationException failed) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
setApplicationEventPublisher
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
- Specified by:
setApplicationEventPublisher
in interfaceApplicationEventPublisherAware
-
setTokenRequestParameter
public void setTokenRequestParameter(String tokenRequestParameter)
-
setAuthenticationDetailsSource
public void setAuthenticationDetailsSource(AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
-
setAuthenticationFailureHandler
public void setAuthenticationFailureHandler(AuthenticationFailureHandler authenticationFailureHandler)
-
-