Class WebHttpSessionRequestCache

java.lang.Object
org.springframework.security.web.savedrequest.HttpSessionRequestCache
de.hybris.platform.yacceleratorstorefront.security.impl.WebHttpSessionRequestCache
All Implemented Interfaces:
Serializable, org.springframework.security.web.savedrequest.RequestCache

public class WebHttpSessionRequestCache extends org.springframework.security.web.savedrequest.HttpSessionRequestCache implements 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:
  • Constructor Details

    • WebHttpSessionRequestCache

      public WebHttpSessionRequestCache()
  • Method Details

    • setSessionService

      public void setSessionService(SessionService sessionService)
    • getSessionService

      public SessionService getSessionService()
    • 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 String calculateRelativeRedirectUrl(String contextPath, String url)