@Component public class VaadinDefaultRequestCache extends Object implements org.springframework.security.web.savedrequest.RequestCache
For the requests that are not ignored, delegates the actual saving to the
other RequestCache instance. Uses an internal
HttpSessionRequestCache for delegating to, unless a custom delegate
is set using the
setDelegateRequestCache(RequestCache)
method.
Using this class helps with redirecting the user to the correct route after login instead of redirecting to some internal URL like a service worker or some data the service worker has fetched.
| Constructor and Description |
|---|
VaadinDefaultRequestCache() |
| Modifier and Type | Method and Description |
|---|---|
javax.servlet.http.HttpServletRequest |
getMatchingRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
org.springframework.security.web.savedrequest.SavedRequest |
getRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
removeRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
saveRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setDelegateRequestCache(org.springframework.security.web.savedrequest.RequestCache delegateRequestCache)
Sets the cache implementation that is used for the actual saving of the
requests that are not ignored.
|
public void saveRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
saveRequest in interface org.springframework.security.web.savedrequest.RequestCachepublic org.springframework.security.web.savedrequest.SavedRequest getRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
getRequest in interface org.springframework.security.web.savedrequest.RequestCachepublic javax.servlet.http.HttpServletRequest getMatchingRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
getMatchingRequest in interface org.springframework.security.web.savedrequest.RequestCachepublic void removeRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
removeRequest in interface org.springframework.security.web.savedrequest.RequestCachepublic void setDelegateRequestCache(org.springframework.security.web.savedrequest.RequestCache delegateRequestCache)
delegateRequestCache - the delegate request cacheCopyright © 2021 Vaadin Ltd. All Rights Reserved.