Class DefaultSavedRequest
java.lang.Object
org.springframework.security.web.savedrequest.DefaultSavedRequest
- All Implemented Interfaces:
- Serializable,- SavedRequest
Represents central information from a 
HttpServletRequest.
 
 This class is used by
 AbstractAuthenticationProcessingFilter
 and SavedRequestAwareWrapper to
 reproduce the request after successful authentication. An instance of this class is
 stored at the time of an authentication exception by
 ExceptionTranslationFilter.
 
IMPLEMENTATION NOTE: It is assumed that this object is accessed only from the context of a single thread, so no synchronization around internal collection classes is performed.
This class is based on code in Apache Tomcat.
- See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultSavedRequest(jakarta.servlet.http.HttpServletRequest request) DefaultSavedRequest(jakarta.servlet.http.HttpServletRequest request, String matchingRequestParameterName) DefaultSavedRequest(jakarta.servlet.http.HttpServletRequest request, PortResolver portResolver) Deprecated, for removal: This API element is subject to removal in a future version.DefaultSavedRequest(jakarta.servlet.http.HttpServletRequest request, PortResolver portResolver, String matchingRequestParameterName) Deprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptionbooleandoesRequestMatch(jakarta.servlet.http.HttpServletRequest request, PortResolver portResolver) Deprecated, for removal: This API element is subject to removal in a future version.This is deprecated for removal.List<jakarta.servlet.http.Cookie>getHeaderValues(String name) String[]getParameterValues(String name) Indicates the URL that the user agent used for this request.inttoString()
- 
Field Details- 
loggerprotected static final org.apache.commons.logging.Log logger
 
- 
- 
Constructor Details- 
DefaultSavedRequestpublic DefaultSavedRequest(jakarta.servlet.http.HttpServletRequest request) 
- 
DefaultSavedRequestpublic DefaultSavedRequest(jakarta.servlet.http.HttpServletRequest request, String matchingRequestParameterName) 
- 
DefaultSavedRequest@Deprecated(forRemoval=true) public DefaultSavedRequest(jakarta.servlet.http.HttpServletRequest request, PortResolver portResolver) Deprecated, for removal: This API element is subject to removal in a future version.
- 
DefaultSavedRequest@Deprecated(forRemoval=true) public DefaultSavedRequest(jakarta.servlet.http.HttpServletRequest request, PortResolver portResolver, String matchingRequestParameterName) Deprecated, for removal: This API element is subject to removal in a future version.
 
- 
- 
Method Details- 
doesRequestMatch@Deprecated(forRemoval=true) public boolean doesRequestMatch(jakarta.servlet.http.HttpServletRequest request, PortResolver portResolver) Deprecated, for removal: This API element is subject to removal in a future version.This is deprecated for removal. Users can comparegetRedirectUrl()to theHttpServletRequestURL instead.Determines if the current request matches theDefaultSavedRequest.All URL arguments are considered but not cookies, locales, headers or parameters. - Parameters:
- request- the actual request to be matched against this one
- portResolver- used to obtain the server port of the request
- Returns:
- true if the request is deemed to match this one.
 
- 
getContextPath
- 
getCookies- Specified by:
- getCookiesin interface- SavedRequest
 
- 
getRedirectUrlIndicates the URL that the user agent used for this request.- Specified by:
- getRedirectUrlin interface- SavedRequest
- Returns:
- the full URL of this request
 
- 
getHeaderNames- Specified by:
- getHeaderNamesin interface- SavedRequest
 
- 
getHeaderValues- Specified by:
- getHeaderValuesin interface- SavedRequest
 
- 
getLocales- Specified by:
- getLocalesin interface- SavedRequest
 
- 
getMethod- Specified by:
- getMethodin interface- SavedRequest
 
- 
getParameterMap- Specified by:
- getParameterMapin interface- SavedRequest
 
- 
getParameterNames
- 
getParameterValues- Specified by:
- getParameterValuesin interface- SavedRequest
 
- 
getPathInfo
- 
getQueryString
- 
getRequestURI
- 
getRequestURL
- 
getScheme
- 
getServerName
- 
getServerPortpublic int getServerPort()
- 
getServletPath
- 
toString
 
-