org.springframework.security.wrapper
Class SecurityContextHolderAwareRequestFilter
java.lang.Object
org.springframework.security.ui.SpringSecurityFilter
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
SecurityContextHolderAwareRequestFilter
public SecurityContextHolderAwareRequestFilter()
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()
Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.