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:
-
Field Summary
Fields inherited from class org.springframework.security.web.savedrequest.HttpSessionRequestCache
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcalculateRelativeRedirectUrl(String contextPath, String url) javax.servlet.http.HttpServletRequestgetMatchingRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected org.springframework.security.web.PortResolverprotected org.springframework.security.web.util.matcher.RequestMatcherprotected booleanvoidsaveRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) voidsetCreateSessionAllowed(boolean createSessionAllowed) voidsetPortResolver(org.springframework.security.web.PortResolver portResolver) voidsetRequestMatcher(org.springframework.security.web.util.matcher.RequestMatcher requestMatcher) voidsetSessionService(SessionService sessionService) Methods inherited from class org.springframework.security.web.savedrequest.HttpSessionRequestCache
getRequest, removeRequest, setSessionAttrName
-
Constructor Details
-
WebHttpSessionRequestCache
public WebHttpSessionRequestCache()
-
-
Method Details
-
setSessionService
-
getSessionService
-
setRequestMatcher
public void setRequestMatcher(org.springframework.security.web.util.matcher.RequestMatcher requestMatcher) - Overrides:
setRequestMatcherin classorg.springframework.security.web.savedrequest.HttpSessionRequestCache
-
setPortResolver
public void setPortResolver(org.springframework.security.web.PortResolver portResolver) - Overrides:
setPortResolverin classorg.springframework.security.web.savedrequest.HttpSessionRequestCache
-
setCreateSessionAllowed
public void setCreateSessionAllowed(boolean createSessionAllowed) - Overrides:
setCreateSessionAllowedin classorg.springframework.security.web.savedrequest.HttpSessionRequestCache
-
saveRequest
public void saveRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) - Specified by:
saveRequestin interfaceorg.springframework.security.web.savedrequest.RequestCache- Overrides:
saveRequestin classorg.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:
getMatchingRequestin interfaceorg.springframework.security.web.savedrequest.RequestCache- Overrides:
getMatchingRequestin classorg.springframework.security.web.savedrequest.HttpSessionRequestCache
-
calculateRelativeRedirectUrl
-