info.joseluismartin.auth
Class AuthFilter

java.lang.Object
  extended by org.springframework.web.filter.GenericFilterBean
      extended by org.springframework.web.filter.OncePerRequestFilter
          extended by info.joseluismartin.auth.AuthFilter
All Implemented Interfaces:
javax.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.EnvironmentAware, org.springframework.web.context.ServletContextAware

public class AuthFilter
extends org.springframework.web.filter.OncePerRequestFilter

Servlet 2.3 Filter for simple session auth

Author:
Jose Luis Martin - (jlm@joseluismartin.info)

Field Summary
static String SESSION_USER_KEY
           
 
Fields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIX
 
Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger
 
Constructor Summary
AuthFilter()
           
 
Method Summary
 void destroy()
           
protected  void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)
           
protected  boolean isLoginPage(javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, getAlreadyFilteredAttributeName, shouldNotFilter
 
Methods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_USER_KEY

public static String SESSION_USER_KEY
Constructor Detail

AuthFilter

public AuthFilter()
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Overrides:
destroy in class org.springframework.web.filter.GenericFilterBean

doFilterInternal

protected void doFilterInternal(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                javax.servlet.FilterChain chain)
                         throws javax.servlet.ServletException,
                                IOException
Specified by:
doFilterInternal in class org.springframework.web.filter.OncePerRequestFilter
Throws:
javax.servlet.ServletException
IOException

isLoginPage

protected boolean isLoginPage(javax.servlet.http.HttpServletRequest request)


Copyright © 2012 JDAL. All Rights Reserved.