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
FieldsFields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
logger -
Constructor Summary
ConstructorsConstructorDescriptionSessionUrlAuthenticationSuccessHandler(String defaultTargetUrl) Constructor which sets the defaultTargetUrl property of the base class. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdetermineTargetUrl(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Builds the target URL according to the logic defined in the main class Javadoc.voidsetTargetUrlSessionAttribute(String targetUrlSessionAttribute) Methods inherited from class org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
clearAuthenticationAttributes, onAuthenticationSuccessMethods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseRefererMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
determineTargetUrlin classorg.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
-
getTargetUrlSessionAttribute
- Returns:
- the targetUrlSessionAttribute
-
setTargetUrlSessionAttribute
- Parameters:
targetUrlSessionAttribute- the targetUrlSessionAttribute to set
-