org.apache.sling.auth.core.spi
Class DefaultAuthenticationFeedbackHandler

java.lang.Object
  extended by org.apache.sling.auth.core.spi.DefaultAuthenticationFeedbackHandler
All Implemented Interfaces:
AuthenticationFeedbackHandler
Direct Known Subclasses:
AbstractAuthenticationHandler

public class DefaultAuthenticationFeedbackHandler
extends Object
implements AuthenticationFeedbackHandler


Constructor Summary
DefaultAuthenticationFeedbackHandler()
           
 
Method Summary
 void authenticationFailed(HttpServletRequest request, HttpServletResponse response, AuthenticationInfo authInfo)
          This default implementation does nothing.
 boolean authenticationSucceeded(HttpServletRequest request, HttpServletResponse response, AuthenticationInfo authInfo)
          This default implementation calls the handleRedirect(HttpServletRequest, HttpServletResponse) method to optionally redirect the request after successful authentication.
static boolean handleRedirect(HttpServletRequest request, HttpServletResponse response)
          Handles an optional request for a redirect after successful authentication and true if the request has been redirected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAuthenticationFeedbackHandler

public DefaultAuthenticationFeedbackHandler()
Method Detail

handleRedirect

public static boolean handleRedirect(HttpServletRequest request,
                                     HttpServletResponse response)
Handles an optional request for a redirect after successful authentication and true if the request has been redirected.

This method checks AuthenticationSupport.REDIRECT_PARAMETER request parameter for the redirect target. This parameter is handled as follows:


authenticationFailed

public void authenticationFailed(HttpServletRequest request,
                                 HttpServletResponse response,
                                 AuthenticationInfo authInfo)
This default implementation does nothing.

Extensions of this class may overwrite to cleanup any internal state.

Specified by:
authenticationFailed in interface AuthenticationFeedbackHandler
Parameters:
request - The current request
response - The current response
authInfo - The AuthenticationInfo object used to authenticate the request.

authenticationSucceeded

public boolean authenticationSucceeded(HttpServletRequest request,
                                       HttpServletResponse response,
                                       AuthenticationInfo authInfo)
This default implementation calls the handleRedirect(HttpServletRequest, HttpServletResponse) method to optionally redirect the request after successful authentication.

Extensions of this class may overwrite this method to perform additional cleanup etc.

Specified by:
authenticationSucceeded in interface AuthenticationFeedbackHandler
Parameters:
request - The current request
response - The current response
authInfo - The AuthenticationInfo object used to authenticate the request.
Returns:
the result of calling the handleRedirect(HttpServletRequest, HttpServletResponse) method.


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.