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 Details

  • Constructor Details

    • DefaultLoginPageGeneratingFilter

      public DefaultLoginPageGeneratingFilter()
    • DefaultLoginPageGeneratingFilter

      public DefaultLoginPageGeneratingFilter(UsernamePasswordAuthenticationFilter authFilter)
  • 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

      public void setLogoutSuccessUrl(String logoutSuccessUrl)
    • getLoginPageUrl

      public String getLoginPageUrl()
    • setLoginPageUrl

      public void setLoginPageUrl(String loginPageUrl)
    • setFailureUrl

      public void setFailureUrl(String failureUrl)
    • setFormLoginEnabled

      public void setFormLoginEnabled(boolean formLoginEnabled)
    • setOauth2LoginEnabled

      public void setOauth2LoginEnabled(boolean oauth2LoginEnabled)
    • setSaml2LoginEnabled

      public void setSaml2LoginEnabled(boolean saml2LoginEnabled)
    • setAuthenticationUrl

      public void setAuthenticationUrl(String authenticationUrl)
    • setUsernameParameter

      public void setUsernameParameter(String usernameParameter)
    • setPasswordParameter

      public void setPasswordParameter(String passwordParameter)
    • setRememberMeParameter

      public void setRememberMeParameter(String rememberMeParameter)
    • setOauth2AuthenticationUrlToClientName

      public void setOauth2AuthenticationUrlToClientName(Map<String,String> oauth2AuthenticationUrlToClientName)
    • setSaml2AuthenticationUrlToProviderName

      public void setSaml2AuthenticationUrlToProviderName(Map<String,String> saml2AuthenticationUrlToProviderName)
    • 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