org.springframework.security.web.authentication
Class SimpleUrlAuthenticationSuccessHandler

java.lang.Object
  extended by org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
      extended by org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
All Implemented Interfaces:
AuthenticationSuccessHandler
Direct Known Subclasses:
SavedRequestAwareAuthenticationSuccessHandler

public class SimpleUrlAuthenticationSuccessHandler
extends AbstractAuthenticationTargetUrlRequestHandler
implements AuthenticationSuccessHandler

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.

Since:
3.0
Version:
$Id: SimpleUrlAuthenticationSuccessHandler.java 3888 2009-09-13 21:51:54Z ltaylor $
Author:
Luke Taylor

Field Summary
 
Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
DEFAULT_TARGET_PARAMETER, logger
 
Constructor Summary
SimpleUrlAuthenticationSuccessHandler()
           
SimpleUrlAuthenticationSuccessHandler(String defaultTargetUrl)
          Constructor which sets the defaultTargetUrl property of the base class.
 
Method Summary
 void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
          Called when a user has been successfully authenticated.
 
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
 

Constructor Detail

SimpleUrlAuthenticationSuccessHandler

public SimpleUrlAuthenticationSuccessHandler()

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.
Method Detail

onAuthenticationSuccess

public void onAuthenticationSuccess(HttpServletRequest request,
                                    HttpServletResponse response,
                                    Authentication authentication)
                             throws IOException,
                                    ServletException
Description copied from interface: AuthenticationSuccessHandler
Called when a user has been successfully authenticated.

Specified by:
onAuthenticationSuccess in interface AuthenticationSuccessHandler
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


Copyright © 2004-2009 SpringSource, Inc. All Rights Reserved.