Class RequestedUrlRedirectInvalidSessionStrategy
- java.lang.Object
-
- org.springframework.security.web.session.RequestedUrlRedirectInvalidSessionStrategy
-
- All Implemented Interfaces:
InvalidSessionStrategy
public final class RequestedUrlRedirectInvalidSessionStrategy extends java.lang.Object implements InvalidSessionStrategy
Performs a redirect to the original request URL when an invalid requested session is detected by theSessionManagementFilter
.
-
-
Constructor Summary
Constructors Constructor Description RequestedUrlRedirectInvalidSessionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onInvalidSessionDetected(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
void
setCreateNewSession(boolean createNewSession)
Determines whether a new session should be created before redirecting (to avoid possible looping issues where the same session ID is sent with the redirected request).
-
-
-
Method Detail
-
onInvalidSessionDetected
public void onInvalidSessionDetected(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
- Specified by:
onInvalidSessionDetected
in interfaceInvalidSessionStrategy
- Throws:
java.io.IOException
-
setCreateNewSession
public void setCreateNewSession(boolean createNewSession)
Determines whether a new session should be created before redirecting (to avoid possible looping issues where the same session ID is sent with the redirected request). Alternatively, ensure that the configured URL does not pass through theSessionManagementFilter
.- Parameters:
createNewSession
- defaults totrue
.
-
-