File Source: authenticationprocessingfilter.java

         /* 
    P/P   *  Method: void net.sourceforge.pebble.security.AuthenticationProcessingFilter()
          */
     1  package net.sourceforge.pebble.security;
     2  
     3  import org.acegisecurity.AuthenticationException;
     4  import org.apache.commons.logging.Log;
     5  import org.apache.commons.logging.LogFactory;
     6  
     7  import javax.servlet.http.HttpServletRequest;
     8  import javax.servlet.http.HttpServletResponse;
     9  import java.io.IOException;
    10  
    11  /**
    12   * Overidden to redirect the user to the blog that they were trying to log in to.
    13   *
    14   * @author    Simon Brown
    15   */
    16  public class AuthenticationProcessingFilter extends org.acegisecurity.ui.webapp.AuthenticationProcessingFilter {
    17  
    18    private static final Log log = LogFactory.getLog(AuthenticationProcessingFilter.class);
    19  
    20    /**
    21     * Overidden to set the value of the defaultTargetUrl property based upon a form parameter.
    22     *
    23     * @param request
    24     * @param response
    25     * @throws AuthenticationException
    26     * @throws IOException
    27     */
    28    protected void onPreAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException, IOException {
    29  //    PebbleContext context = PebbleContext.getInstance();
    30  //    if (context.getConfiguration().isVirtualHostingEnabled()) {
    31  //      Cookie cookie = CookieUtils.getCookie(request.getCookies(), TokenBasedRememberMeServices.ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE_KEY);
    32  //      if (cookie != null) {
    33  //        cookie.setDomain("." + context.getConfiguration().getDomainName());
    34  //        response.addCookie(cookie);
    35  //      }
    36  //    }
    37  //
             /* 
    P/P       *  Method: void onPreAuthentication(HttpServletRequest, HttpServletResponse)
              * 
              *  Preconditions:
              *    request != null
              */
    38      setDefaultTargetUrl(request.getParameter("redirectUrl"));
    39      super.onPreAuthentication(request, response);
    40    }
    41  
    42  }








SofCheck Inspector Build Version : 2.22510
authenticationprocessingfilter.java 2010-Jun-25 19:40:32
authenticationprocessingfilter.class 2010-Jul-19 20:23:38