Class VerifyRedirectCookieFilter

  • All Implemented Interfaces:
    javax.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 VerifyRedirectCookieFilter
    extends org.springframework.web.filter.GenericFilterBean
    This filter is for verifying that there's a saved redirect cookie on the request for certain URIs. If no saved redirect cookie exists for a request that requires one then the user is redirected to a default URI.
    Author:
    Jay Aisenbrey (cja769)
    • Method Detail

      • doFilter

        public void doFilter​(javax.servlet.ServletRequest request,
                             javax.servlet.ServletResponse response,
                             javax.servlet.FilterChain chain)
                      throws IOException,
                             javax.servlet.ServletException
        Throws:
        IOException
        javax.servlet.ServletException
      • shouldVerifyRedirect

        protected boolean shouldVerifyRedirect​(javax.servlet.http.HttpServletRequest request)
        Specifies if the redirect cookie should be verified for the given request
        Parameters:
        request - the request to be verified against
        Returns:
        true if verification on if a redirect cookie exists on a request is needed else false
      • getRequestMatcher

        protected org.springframework.security.web.util.matcher.RequestMatcher getRequestMatcher()