Class DefaultOneTimeTokenSubmitPageGeneratingFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.springframework.security.web.authentication.ui.DefaultOneTimeTokenSubmitPageGeneratingFilter
- All Implemented Interfaces:
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.EnvironmentAware
,org.springframework.core.env.EnvironmentCapable
,org.springframework.web.context.ServletContextAware
public final class DefaultOneTimeTokenSubmitPageGeneratingFilter
extends org.springframework.web.filter.OncePerRequestFilter
Creates a default one-time token submit page. If the request contains a
token
query param the page will automatically fill the form with the token value.- Since:
- 6.4
-
Field Summary
FieldsFields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIX
Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doFilterInternal
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) void
setLoginProcessingUrl
(String loginProcessingUrl) Specifies the URL that the submit form should POST to.void
setRequestMatcher
(RequestMatcher requestMatcher) Use thisRequestMatcher
to choose whether this filter will handle the request.void
setResolveHiddenInputs
(Function<jakarta.servlet.http.HttpServletRequest, Map<String, String>> resolveHiddenInputs) Sets a Function used to resolve a Map of the hidden inputs where the key is the name of the input and the value is the value of the input.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
-
DEFAULT_SUBMIT_PAGE_URL
- See Also:
-
-
Constructor Details
-
DefaultOneTimeTokenSubmitPageGeneratingFilter
public DefaultOneTimeTokenSubmitPageGeneratingFilter()
-
-
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 classorg.springframework.web.filter.OncePerRequestFilter
- Throws:
jakarta.servlet.ServletException
IOException
-
setResolveHiddenInputs
public void setResolveHiddenInputs(Function<jakarta.servlet.http.HttpServletRequest, Map<String, String>> resolveHiddenInputs) Sets a Function used to resolve a Map of the hidden inputs where the key is the name of the input and the value is the value of the input.- Parameters:
resolveHiddenInputs
- the function to resolve the inputs
-
setRequestMatcher
Use thisRequestMatcher
to choose whether this filter will handle the request. By default, it handles/login/ott
.- Parameters:
requestMatcher
- theRequestMatcher
to use
-
setLoginProcessingUrl
Specifies the URL that the submit form should POST to. Defaults to/login/ott
.- Parameters:
loginProcessingUrl
-
-