Class WebHttpSessionRequestCache

  • All Implemented Interfaces:
    java.io.Serializable, org.springframework.security.web.savedrequest.RequestCache

    public class WebHttpSessionRequestCache
    extends org.springframework.security.web.savedrequest.HttpSessionRequestCache
    implements java.io.Serializable
    Extension of HttpSessionRequestCache that allows pass through of cookies from the current request. This is required to allow the GUIDInterceptor to see the secure cookie written during authentication. The RequestCache stores the SavedRequest in the HttpSession, this is then restored perfectly. Unfortunately the saved request also hides new cookies that have been written since the saved request was created. This implementation allows the current request's cookie values to override the cookies within the saved request.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.springframework.security.web.savedrequest.HttpSessionRequestCache

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String calculateRelativeRedirectUrl​(java.lang.String contextPath, java.lang.String url)  
      javax.servlet.http.HttpServletRequest getMatchingRequest​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      protected org.springframework.security.web.PortResolver getPortResolver()  
      protected org.springframework.security.web.util.matcher.RequestMatcher getRequestMatcher()  
      SessionService getSessionService()  
      protected boolean isCreateSessionAllowed()  
      void saveRequest​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      void setCreateSessionAllowed​(boolean createSessionAllowed)  
      void setPortResolver​(org.springframework.security.web.PortResolver portResolver)  
      void setRequestMatcher​(org.springframework.security.web.util.matcher.RequestMatcher requestMatcher)  
      void setSessionService​(SessionService sessionService)  
      • Methods inherited from class org.springframework.security.web.savedrequest.HttpSessionRequestCache

        getRequest, removeRequest, setSessionAttrName
      • Methods inherited from class java.lang.Object

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

      • WebHttpSessionRequestCache

        public WebHttpSessionRequestCache()
    • Method Detail

      • setSessionService

        public void setSessionService​(SessionService sessionService)
      • setRequestMatcher

        public void setRequestMatcher​(org.springframework.security.web.util.matcher.RequestMatcher requestMatcher)
        Overrides:
        setRequestMatcher in class org.springframework.security.web.savedrequest.HttpSessionRequestCache
      • setPortResolver

        public void setPortResolver​(org.springframework.security.web.PortResolver portResolver)
        Overrides:
        setPortResolver in class org.springframework.security.web.savedrequest.HttpSessionRequestCache
      • setCreateSessionAllowed

        public void setCreateSessionAllowed​(boolean createSessionAllowed)
        Overrides:
        setCreateSessionAllowed in class org.springframework.security.web.savedrequest.HttpSessionRequestCache
      • saveRequest

        public void saveRequest​(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response)
        Specified by:
        saveRequest in interface org.springframework.security.web.savedrequest.RequestCache
        Overrides:
        saveRequest in class org.springframework.security.web.savedrequest.HttpSessionRequestCache
      • isCreateSessionAllowed

        protected boolean isCreateSessionAllowed()
      • getPortResolver

        protected org.springframework.security.web.PortResolver getPortResolver()
      • getRequestMatcher

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

        public javax.servlet.http.HttpServletRequest getMatchingRequest​(javax.servlet.http.HttpServletRequest request,
                                                                        javax.servlet.http.HttpServletResponse response)
        Specified by:
        getMatchingRequest in interface org.springframework.security.web.savedrequest.RequestCache
        Overrides:
        getMatchingRequest in class org.springframework.security.web.savedrequest.HttpSessionRequestCache
      • calculateRelativeRedirectUrl

        protected java.lang.String calculateRelativeRedirectUrl​(java.lang.String contextPath,
                                                                java.lang.String url)