Clover Coverage Report - Pebble 2.5-SNAPSHOT
Coverage timestamp: Sat Jun 12 2010 09:39:29 EST
../../../../img/srcFileCovDistChart0.png 48% of files have more coverage
2   42   1   2
0   13   0,5   1
1     1  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  AuthenticationProcessingFilter       Line # 16 2 0% 1 3 0% 0.0
 
No Tests
 
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  0 toggle 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    //
38  0 setDefaultTargetUrl(request.getParameter("redirectUrl"));
39  0 super.onPreAuthentication(request, response);
40    }
41   
42    }