Class MatchingRequestParameterNameRemovalRedirectFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
com.flowable.core.spring.security.web.savedrequest.MatchingRequestParameterNameRemovalRedirectFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
,Aware
,BeanNameAware
,DisposableBean
,InitializingBean
,EnvironmentAware
,EnvironmentCapable
,ServletContextAware
A filter which is going to remove the
matchingRequestParameter
created by the
HttpSessionRequestCache
.
This makes sure that when using OAuth2 there won't be lingering ?continue
parameters in the URL.
The lingering ?continue
is there when there is no session for the application, but there is one from the SSO.
The login procedure from Spring will redirect to the SSO, which will redirect back to our application and then will add the ?continue.- Author:
- Filip Hrisafov
-
Field Summary
Fields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIX
Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger
-
Constructor Summary
ConstructorDescriptionMatchingRequestParameterNameRemovalRedirectFilter
(String matchingRequestParameterName) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
createRedirectUrl
(jakarta.servlet.http.HttpServletRequest request) protected void
doFilterInternal
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) 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 Details
-
redirectStrategy
-
matchingRequestParameterName
-
-
Constructor Details
-
MatchingRequestParameterNameRemovalRedirectFilter
public MatchingRequestParameterNameRemovalRedirectFilter() -
MatchingRequestParameterNameRemovalRedirectFilter
-
-
Method Details
-
doFilterInternal
protected void doFilterInternal(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) throws jakarta.servlet.ServletException, IOException - Specified by:
doFilterInternal
in classOncePerRequestFilter
- Throws:
jakarta.servlet.ServletException
IOException
-
createRedirectUrl
-