gov.nih.nci.caarray.ui.core
Class SecurityContextFilter

java.lang.Object
  extended by gov.nih.nci.caarray.ui.core.SecurityContextFilter
All Implemented Interfaces:
javax.servlet.Filter

public class SecurityContextFilter
extends java.lang.Object
implements javax.servlet.Filter

Filter that sets the security information for the scope of the current request.


Constructor Summary
SecurityContextFilter()
           
 
Method Summary
 void destroy()
          Destroys the filter.
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          Performs a temporary JAAS login for the duration of the request.
 void init(javax.servlet.FilterConfig config)
          Initializes the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityContextFilter

public SecurityContextFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig config)
Initializes the filter. Reads the parameter values as specified in the web.xml file.

Specified by:
init in interface javax.servlet.Filter
Parameters:
config - the filter configuration object

destroy

public void destroy()
Destroys the filter. Is an empty method in this implementation.

Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Performs a temporary JAAS login for the duration of the request. Obtains username and password by calling the getUsername() and getPassword() methods. Nothing is done when the first returns null.

Specified by:
doFilter in interface javax.servlet.Filter
Parameters:
request - the (http) request
response - the (http) response
chain - the filter chain
Throws:
java.io.IOException
javax.servlet.ServletException