org.edg.security.authorization.admin
Class AuthzFilter

java.lang.Object
  |
  +--org.edg.security.authorization.admin.AuthzFilter
All Implemented Interfaces:
javax.servlet.Filter

public final class AuthzFilter
extends java.lang.Object
implements javax.servlet.Filter

This class implements javax.servlet.Filter and its purpose is to inspect X509 distinguished names of the clients and decide whether they are authorized to act as administrator of the AuthorizationManager. This class is a lightweight version of the full implementation available in org.edg.security.authorization.AuthorizationServlet.

Version:
$Id: AuthzFilter.java,v 1.9 2003/10/23 16:07:08 gianluca Exp $
Author:
Niklas Karlsson Gian Luca Volpato

Constructor Summary
AuthzFilter()
           
 
Method Summary
 void destroy()
          Deallocates member objects.
 void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain fchain)
          Filters the ServletRequest and adds information, like authorized connections, into the request via a specific RequestWrapper class.
 void init(javax.servlet.FilterConfig filterConfig)
          Initializes the AuthzFilter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthzFilter

public AuthzFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Initializes the AuthzFilter. Loads the configuration parameters. Creates a private instance of the AuthorizationManager.

Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException - In case of an error

doFilter

public void doFilter(javax.servlet.ServletRequest req,
                     javax.servlet.ServletResponse res,
                     javax.servlet.FilterChain fchain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Filters the ServletRequest and adds information, like authorized connections, into the request via a specific RequestWrapper class.

Specified by:
doFilter in interface javax.servlet.Filter
Parameters:
req - The ServletRequest to be filtered
res - The ServletResponse
fchain - The Filterchain defined in the app's web.xml file
Throws:
java.io.IOException
javax.servlet.ServletException

destroy

public void destroy()
Deallocates member objects.

Specified by:
destroy in interface javax.servlet.Filter