Class ForceLoginFormFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
ch.admin.bit.jeap.oauth.mock.server.login.ForceLoginFormFilter
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 ForceLoginFormFilter extends org.springframework.web.filter.GenericFilterBean
Spring Login form support is stateful, i.e. a HTTP session is used to keep the current OAuth request while the user fills the login form. This filter invalidates the session as soon as an auth code is generated after submitting the login form, thus making sure the login form is displayed again when going through the mock auth server. This allows the user to enter roles etc. in the login form without having to log out / clear the browser cache beforehand.
  • Field Summary

    Fields inherited from class org.springframework.web.filter.GenericFilterBean

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doFilter(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse, jakarta.servlet.FilterChain filterChain)
     

    Methods inherited from class org.springframework.web.filter.GenericFilterBean

    addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ForceLoginFormFilter

      public ForceLoginFormFilter()
  • Method Details

    • doFilter

      public void doFilter(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException
      Throws:
      IOException
      jakarta.servlet.ServletException