public class FilterSecurityInterceptor extends AbstractSecurityInterceptor implements javax.servlet.Filter
The
ObjectDefinitionSource
required by this security interceptor is of type FilterInvocationDefinitionSource
.
Refer to AbstractSecurityInterceptor
for details on the workflow.
logger, messages
Constructor and Description |
---|
FilterSecurityInterceptor() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Not used (we rely on IoC container lifecycle services instead)
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Method that is actually called by the filter chain.
|
FilterInvocationDefinitionSource |
getObjectDefinitionSource() |
Class |
getSecureObjectClass()
Indicates the type of secure objects the subclass will be presenting to
the abstract parent for processing.
|
void |
init(javax.servlet.FilterConfig arg0)
Not used (we rely on IoC container lifecycle services instead)
|
void |
invoke(FilterInvocation fi) |
boolean |
isObserveOncePerRequest()
Indicates whether once-per-request handling will be observed.
|
ObjectDefinitionSource |
obtainObjectDefinitionSource() |
void |
setObjectDefinitionSource(FilterInvocationDefinitionSource newSource) |
void |
setObserveOncePerRequest(boolean observeOncePerRequest) |
afterInvocation, afterPropertiesSet, beforeInvocation, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isAlwaysReauthenticate, isRejectPublicInvocations, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setAlwaysReauthenticate, setApplicationEventPublisher, setAuthenticationManager, setMessageSource, setRejectPublicInvocations, setRunAsManager, setValidateConfigAttributes
public void destroy()
destroy
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
invoke(FilterInvocation)
method.doFilter
in interface javax.servlet.Filter
request
- the servlet requestresponse
- the servlet responsechain
- the filter chainIOException
- if the filter chain failsjavax.servlet.ServletException
- if the filter chain failspublic FilterInvocationDefinitionSource getObjectDefinitionSource()
public Class getSecureObjectClass()
AbstractSecurityInterceptor
AbstractSecurityInterceptor
all support the
indicated secure object class.getSecureObjectClass
in class AbstractSecurityInterceptor
public void init(javax.servlet.FilterConfig arg0) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
arg0
- ignoredjavax.servlet.ServletException
- never thrownpublic void invoke(FilterInvocation fi) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public boolean isObserveOncePerRequest()
true
,
meaning the FilterSecurityInterceptor
will only execute once-per-request. Sometimes users may wish
it to execute more than once per request, such as when JSP forwards are being used and filter security is
desired on each included fragment of the HTTP request.true
(the default) if once-per-request is honoured, otherwise false
if
FilterSecurityInterceptor
will enforce authorizations for each and every fragment of the
HTTP request.public ObjectDefinitionSource obtainObjectDefinitionSource()
obtainObjectDefinitionSource
in class AbstractSecurityInterceptor
public void setObjectDefinitionSource(FilterInvocationDefinitionSource newSource)
public void setObserveOncePerRequest(boolean observeOncePerRequest)
Copyright © 2018. All rights reserved.