org.kuali.hr
Class TestAutoLoginFilter

java.lang.Object
  extended by org.kuali.hr.TestAutoLoginFilter
All Implemented Interfaces:
javax.servlet.Filter

public class TestAutoLoginFilter
extends Object
implements javax.servlet.Filter

Automatically logs in with the user specified via filter init parameter AutoLoginFilter.USER_PARAM_NAME.

There are no guarantees made that the user specified is a valid user in the system.

In rice this Filter can be used via config like that following assuming the bootstrap filter is used:
<param name="filter.login.class">org.kuali.kra.test.infrastructure.AutoLoginFilter</param>
<param name="filtermapping.login.1">/*</param>
<param name="filter.login.autouser">admin</param>


Field Summary
static String OVERRIDE_ID
           
static String USER_PARAM_NAME
           
 
Constructor Summary
TestAutoLoginFilter()
           
 
Method Summary
 void destroy()
          
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          
 void init(javax.servlet.FilterConfig config)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_PARAM_NAME

public static final String USER_PARAM_NAME
See Also:
Constant Field Values

OVERRIDE_ID

public static String OVERRIDE_ID
Constructor Detail

TestAutoLoginFilter

public TestAutoLoginFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig config)
          throws javax.servlet.ServletException

Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws IOException,
                     javax.servlet.ServletException

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException

destroy

public void destroy()

Specified by:
destroy in interface javax.servlet.Filter


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.