net.sf.jguard.authentication.http
Class AccessFilter

java.lang.Object
  extended by net.sf.jguard.authentication.http.AccessFilter
All Implemented Interfaces:
javax.servlet.Filter, HttpConstants

public class AccessFilter
extends java.lang.Object
implements javax.servlet.Filter, HttpConstants

this Filter handle the control access of all request.

Author:
Charles Gay

Field Summary
static org.apache.commons.logging.Log logger
          Logger for this class
 
Fields inherited from interface net.sf.jguard.authentication.http.HttpConstants
ACCESS_DENIED_URI, AUTH_SCHEME, AUTH_UTILS, AUTHENTICATION_FAILED_URI, BASIC_AUTH, CAPTCHA_SERVICE, CLIENT_CERT_AUTH, CONFIGURATION_LOCATION, DEBUG, DIGEST_AUTH, FIRST_REQUEST, FORM_AUTH, HTTP, HTTPS, INDEX_URI, LAST_ACCESS_DENIED_URI, LOGIN_EXCEPTION_CLASS, LOGIN_EXCEPTION_MESSAGE, LOGOFF_URI, LOGON_PROCESS_URI, LOGON_URI, REGISTER_PROCESS_URI, REGISTER_URI, USERS_IN_SESSION, WEBAPP_HOME_PATH
 
Constructor Summary
AccessFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          the method which handle the request.
 void init(javax.servlet.FilterConfig filterCfg)
          Filter initialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final org.apache.commons.logging.Log logger
Logger for this class

Constructor Detail

AccessFilter

public AccessFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterCfg)
          throws javax.servlet.ServletException
Filter initialization.

Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException
See Also:
Filter.init(javax.servlet.FilterConfig)

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
the method which handle the request. this method was inspired by the article on jaas published at this address.

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
java.io.IOException
javax.servlet.ServletException
See Also:
Filter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter
See Also:
Filter.destroy()