public class SimpleUrlAuthenticationSuccessHandler extends AbstractAuthenticationTargetUrlRequestHandler implements AuthenticationSuccessHandler
The logic used is that of the parent class
.
logger
Constructor and Description |
---|
SimpleUrlAuthenticationSuccessHandler() |
SimpleUrlAuthenticationSuccessHandler(java.lang.String defaultTargetUrl)
Constructor which sets the defaultTargetUrl property of the base class.
|
Modifier and Type | Method and Description |
---|---|
protected void |
clearAuthenticationAttributes(javax.servlet.http.HttpServletRequest request)
Removes temporary authentication-related data which may have been stored in the
session during the authentication process.
|
void |
onAuthenticationSuccess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Authentication authentication)
Calls the parent class
handle() method to forward or redirect to the target
URL, and then calls clearAuthenticationAttributes() to remove any leftover
session data. |
determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseReferer
public SimpleUrlAuthenticationSuccessHandler()
public SimpleUrlAuthenticationSuccessHandler(java.lang.String defaultTargetUrl)
defaultTargetUrl
- the URL to which the user should be redirected on
successful authentication.public void onAuthenticationSuccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Authentication authentication) throws java.io.IOException, javax.servlet.ServletException
handle()
method to forward or redirect to the target
URL, and then calls clearAuthenticationAttributes()
to remove any leftover
session data.onAuthenticationSuccess
in interface AuthenticationSuccessHandler
request
- the request which caused the successful authenticationresponse
- the responseauthentication
- the Authentication object which was created during
the authentication process.java.io.IOException
javax.servlet.ServletException
protected final void clearAuthenticationAttributes(javax.servlet.http.HttpServletRequest request)