java.lang.Object |
↳ |
org.springframework.security.web.savedrequest.HttpSessionRequestCache |
Class Overview
RequestCache
which stores the SavedRequest
in the HttpSession.
The DefaultSavedRequest
class is used as the implementation.
Summary
Fields |
protected
final
Log |
logger |
|
Public Methods |
HttpServletRequest
|
getMatchingRequest(HttpServletRequest request, HttpServletResponse response)
Returns a wrapper around the saved request, if it matches the current request.
|
SavedRequest
|
getRequest(HttpServletRequest currentRequest, HttpServletResponse response)
Returns the saved request, leaving it cached.
|
void
|
removeRequest(HttpServletRequest currentRequest, HttpServletResponse response)
Removes the cached request.
|
void
|
saveRequest(HttpServletRequest request, HttpServletResponse response)
Stores the current request, provided the configuration properties allow it.
|
void
|
setCreateSessionAllowed(boolean createSessionAllowed)
If true , indicates that it is permitted to store the target
URL and exception information in a new HttpSession (the default).
|
void
|
setPortResolver(PortResolver portResolver)
|
void
|
setRequestMatcher(RequestMatcher requestMatcher)
Allows selective use of saved requests for a subset of requests.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.security.web.savedrequest.RequestCache
abstract
HttpServletRequest
|
getMatchingRequest(HttpServletRequest request, HttpServletResponse response)
Returns a wrapper around the saved request, if it matches the current request.
|
abstract
SavedRequest
|
getRequest(HttpServletRequest request, HttpServletResponse response)
Returns the saved request, leaving it cached.
|
abstract
void
|
removeRequest(HttpServletRequest request, HttpServletResponse response)
Removes the cached request.
|
abstract
void
|
saveRequest(HttpServletRequest request, HttpServletResponse response)
Caches the current request for later retrieval, once authentication has taken place.
|
|
Fields
protected
final
Log
logger
Public Constructors
public
HttpSessionRequestCache
()
Public Methods
public
HttpServletRequest
getMatchingRequest
(HttpServletRequest request, HttpServletResponse response)
Returns a wrapper around the saved request, if it matches the current request. The saved request should
be removed from the cache.
Returns
- the wrapped save request, if it matches the original, or null if there is no cached request or it doesn't
match.
public
SavedRequest
getRequest
(HttpServletRequest currentRequest, HttpServletResponse response)
Returns the saved request, leaving it cached.
Parameters
currentRequest
| the current request |
Returns
- the saved request which was previously cached, or null if there is none.
public
void
removeRequest
(HttpServletRequest currentRequest, HttpServletResponse response)
Removes the cached request.
Parameters
currentRequest
| the current request, allowing access to the cache.
|
public
void
saveRequest
(HttpServletRequest request, HttpServletResponse response)
Stores the current request, provided the configuration properties allow it.
Parameters
request
| the request to be stored
|
public
void
setCreateSessionAllowed
(boolean createSessionAllowed)
If true
, indicates that it is permitted to store the target
URL and exception information in a new HttpSession
(the default).
In situations where you do not wish to unnecessarily create HttpSession
s - because the user agent
will know the failed URL, such as with BASIC or Digest authentication - you may wish to set this property to
false
.
public
void
setRequestMatcher
(RequestMatcher requestMatcher)
Allows selective use of saved requests for a subset of requests. By default any request will be cached
by the saveRequest
method.
If set, only matching requests will be cached.
Parameters
requestMatcher
| a request matching strategy which defines which requests should be cached.
|