Class DefaultLoginPageGeneratingFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter
- 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 class DefaultLoginPageGeneratingFilter
extends org.springframework.web.filter.GenericFilterBean
For internal use with namespace configuration in the case where a user doesn't
configure a login page. The configuration code will insert this filter in the chain
instead.
Will only work if a redirect is used to the login page.
- Since:
- 2.0
-
Field Summary
Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoid
doFilter
(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) boolean
void
setAuthenticationUrl
(String authenticationUrl) void
setFailureUrl
(String failureUrl) void
setFormLoginEnabled
(boolean formLoginEnabled) void
setLoginPageUrl
(String loginPageUrl) void
setLogoutSuccessUrl
(String logoutSuccessUrl) void
setOauth2AuthenticationUrlToClientName
(Map<String, String> oauth2AuthenticationUrlToClientName) void
setOauth2LoginEnabled
(boolean oauth2LoginEnabled) void
setPasswordParameter
(String passwordParameter) void
setRememberMeParameter
(String rememberMeParameter) 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.void
setSaml2AuthenticationUrlToProviderName
(Map<String, String> saml2AuthenticationUrlToProviderName) void
setSaml2LoginEnabled
(boolean saml2LoginEnabled) void
setUsernameParameter
(String usernameParameter) 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_LOGIN_PAGE_URL
- See Also:
-
ERROR_PARAMETER_NAME
- See Also:
-
-
Constructor Details
-
DefaultLoginPageGeneratingFilter
public DefaultLoginPageGeneratingFilter() -
DefaultLoginPageGeneratingFilter
-
-
Method Details
-
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. Typically this is used to resolve the CSRF token.- Parameters:
resolveHiddenInputs
- the function to resolve the inputs
-
isEnabled
public boolean isEnabled() -
setLogoutSuccessUrl
-
getLoginPageUrl
-
setLoginPageUrl
-
setFailureUrl
-
setFormLoginEnabled
public void setFormLoginEnabled(boolean formLoginEnabled) -
setOauth2LoginEnabled
public void setOauth2LoginEnabled(boolean oauth2LoginEnabled) -
setSaml2LoginEnabled
public void setSaml2LoginEnabled(boolean saml2LoginEnabled) -
setAuthenticationUrl
-
setUsernameParameter
-
setPasswordParameter
-
setRememberMeParameter
-
setOauth2AuthenticationUrlToClientName
-
setSaml2AuthenticationUrlToProviderName
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Throws:
IOException
jakarta.servlet.ServletException
-