Spring Security Framework

org.springframework.security.wrapper
Class SecurityContextHolderAwareRequestFilter

java.lang.Object
  extended by org.springframework.security.ui.SpringSecurityFilter
      extended by org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter
All Implemented Interfaces:
Filter, Ordered

public class SecurityContextHolderAwareRequestFilter
extends SpringSecurityFilter

A Filter which populates the ServletRequest with a new request wrapper.

Several request wrappers are included with the framework. The simplest version is SecurityContextHolderAwareRequestWrapper. A more complex and powerful request wrapper is SavedRequestAwareWrapper. The latter is also the default.

To modify the wrapper used, call setWrapperClass(Class).

Any request wrapper configured for instantiation by this class must provide a public constructor that accepts two arguments, being a HttpServletRequest and a PortResolver.

Version:
$Id$
Author:
Orlando Garcia Carmona, Ben Alex

Field Summary
 
Fields inherited from class org.springframework.security.ui.SpringSecurityFilter
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
SecurityContextHolderAwareRequestFilter()
           
 
Method Summary
protected  void doFilterHttp(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
           
 int getOrder()
           
 void setPortResolver(PortResolver portResolver)
           
 void setRolePrefix(String rolePrefix)
           
 void setWrapperClass(Class wrapperClass)
           
 
Methods inherited from class org.springframework.security.ui.SpringSecurityFilter
destroy, doFilter, init, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SecurityContextHolderAwareRequestFilter

public SecurityContextHolderAwareRequestFilter()
Method Detail

setPortResolver

public void setPortResolver(PortResolver portResolver)

setWrapperClass

public void setWrapperClass(Class wrapperClass)

setRolePrefix

public void setRolePrefix(String rolePrefix)

doFilterHttp

protected void doFilterHttp(HttpServletRequest request,
                            HttpServletResponse response,
                            FilterChain chain)
                     throws IOException,
                            ServletException
Specified by:
doFilterHttp in class SpringSecurityFilter
Throws:
IOException
ServletException

getOrder

public int getOrder()

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.