public class TargetUrlResolverImpl extends java.lang.Object implements TargetUrlResolver
TargetUrlResolver
Returns a target URL based from the contents of the configured targetUrlParameter if present on
the current request. Failing that, the SavedRequest in the session will be used.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_TARGET_PARAMETER |
Constructor and Description |
---|
TargetUrlResolverImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
determineTargetUrl(SavedRequest savedRequest,
javax.servlet.http.HttpServletRequest currentRequest,
Authentication auth) |
protected boolean |
isJustUseSavedRequestOnGet() |
void |
setJustUseSavedRequestOnGet(boolean justUseSavedRequestOnGet) |
void |
setTargetUrlParameter(java.lang.String targetUrlParameter)
Before checking the SavedRequest, the current request will be checked for this parameter
and the value used as the target URL if resent.
|
public java.lang.String determineTargetUrl(SavedRequest savedRequest, javax.servlet.http.HttpServletRequest currentRequest, Authentication auth)
determineTargetUrl
in interface TargetUrlResolver
savedRequest
- The request that initiated the authentication processcurrentRequest
- the current requestauth
- The authentication token generated after successful authenticationprotected boolean isJustUseSavedRequestOnGet()
true
if just GET request will be used
to determine target URLs, false
otherwise.public void setJustUseSavedRequestOnGet(boolean justUseSavedRequestOnGet)
justUseSavedRequestOnGet
- set to true
if
just GET request will be used to determine target URLs,
false
otherwise.public void setTargetUrlParameter(java.lang.String targetUrlParameter)
targetUrlParameter
- the name of the parameter containing the encoded target URL. Defaults
to "redirect".