public class

SimpleUrlAuthenticationSuccessHandler

extends AbstractAuthenticationTargetUrlRequestHandler
implements AuthenticationSuccessHandler
java.lang.Object
   ↳ org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
     ↳ org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
Known Direct Subclasses

Class Overview

AuthenticationSuccessHandler which can be configured with a default URL which users should be sent to upon successful authentication.

The logic used is that of the parent class.

Summary

[Expand]
Inherited Fields
From class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
Public Constructors
SimpleUrlAuthenticationSuccessHandler()
SimpleUrlAuthenticationSuccessHandler(String defaultTargetUrl)
Constructor which sets the defaultTargetUrl property of the base class.
Public Methods
void onAuthenticationSuccess(HttpServletRequest request, 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.
Protected Methods
final void clearAuthenticationAttributes(HttpServletRequest request)
Removes temporary authentication-related data which may have been stored in the session during the authentication process.
[Expand]
Inherited Methods
From class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
From class java.lang.Object
From interface org.springframework.security.web.authentication.AuthenticationSuccessHandler

Public Constructors

public SimpleUrlAuthenticationSuccessHandler ()

public SimpleUrlAuthenticationSuccessHandler (String defaultTargetUrl)

Constructor which sets the defaultTargetUrl property of the base class.

Parameters
defaultTargetUrl the URL to which the user should be redirected on successful authentication.

Public Methods

public void onAuthenticationSuccess (HttpServletRequest request, 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.

Parameters
request the request which caused the successful authentication
response the response
authentication the Authentication object which was created during the authentication process.
Throws
IOException
ServletException

Protected Methods

protected final void clearAuthenticationAttributes (HttpServletRequest request)

Removes temporary authentication-related data which may have been stored in the session during the authentication process.