Class SessionUrlAuthenticationSuccessHandler
java.lang.Object
org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
org.jenkinsci.plugins.cas.spring.security.SessionUrlAuthenticationSuccessHandler
- All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationSuccessHandler
public class SessionUrlAuthenticationSuccessHandler
extends org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
AuthenticationSuccessHandler that behaves like SimpleUrlAuthenticationSuccessHandler,
but also looks for a configurable session attribute holding the target URL to redirect to.
- Author:
- Fabien Crespel
-
Field Summary
Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
logger
-
Constructor Summary
ConstructorDescriptionSessionUrlAuthenticationSuccessHandler
(String defaultTargetUrl) Constructor which sets the defaultTargetUrl property of the base class. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
determineTargetUrl
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Builds the target URL according to the logic defined in the main class Javadoc.void
setTargetUrlSessionAttribute
(String targetUrlSessionAttribute) Methods inherited from class org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
clearAuthenticationAttributes, onAuthenticationSuccess
Methods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseReferer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.security.web.authentication.AuthenticationSuccessHandler
onAuthenticationSuccess
-
Field Details
-
DEFAULT_TARGET_URL_SESSION_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
SessionUrlAuthenticationSuccessHandler
Constructor which sets the defaultTargetUrl property of the base class.- Parameters:
defaultTargetUrl
- the URL to which the user should be redirected on successful authentication.
-
-
Method Details
-
determineTargetUrl
protected String determineTargetUrl(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Builds the target URL according to the logic defined in the main class Javadoc.- Overrides:
determineTargetUrl
in classorg.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
-
getTargetUrlSessionAttribute
- Returns:
- the targetUrlSessionAttribute
-
setTargetUrlSessionAttribute
- Parameters:
targetUrlSessionAttribute
- the targetUrlSessionAttribute to set
-