|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.acegisecurity.providers.anonymous.AnonymousProcessingFilter
public class AnonymousProcessingFilter
Detects if there is no Authentication
object in the SecurityContextHolder
, and
populates it with one if needed.
Do not use this class directly. Instead configure web.xml
to use the FilterToBeanProxy
.
Constructor Summary | |
---|---|
AnonymousProcessingFilter()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
protected boolean |
applyAnonymousForThisRequest(javax.servlet.ServletRequest request)
Enables subclasses to determine whether or not an anonymous authentication token should be setup for this request. |
protected Authentication |
createAuthentication(javax.servlet.ServletRequest request)
|
void |
destroy()
Does nothing - we reply on IoC lifecycle services instead. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
|
String |
getKey()
|
UserAttribute |
getUserAttribute()
|
void |
init(javax.servlet.FilterConfig ignored)
Does nothing - we reply on IoC lifecycle services instead. |
boolean |
isRemoveAfterRequest()
|
void |
setAuthenticationDetailsSource(AuthenticationDetailsSource authenticationDetailsSource)
|
void |
setKey(String key)
|
void |
setRemoveAfterRequest(boolean removeAfterRequest)
Controls whether the filter will remove the Anonymous token after the request is complete. |
void |
setUserAttribute(UserAttribute userAttributeDefinition)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnonymousProcessingFilter()
Method Detail |
---|
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
protected boolean applyAnonymousForThisRequest(javax.servlet.ServletRequest request)
request
- to assist the method determine request details
true
if the anonymous token should be setup for this request (provided that the request
doesn't already have some other Authentication
inside it), or false
if no
anonymous token should be setup for this requestprotected Authentication createAuthentication(javax.servlet.ServletRequest request)
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
doFilter
in interface javax.servlet.Filter
IOException
javax.servlet.ServletException
public String getKey()
public UserAttribute getUserAttribute()
public void init(javax.servlet.FilterConfig ignored) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
ignored
- not used
javax.servlet.ServletException
- DOCUMENT ME!public boolean isRemoveAfterRequest()
public void setAuthenticationDetailsSource(AuthenticationDetailsSource authenticationDetailsSource)
public void setKey(String key)
public void setRemoveAfterRequest(boolean removeAfterRequest)
HttpSessionContextIntegrationFilter
simply to
store the Anonymous authentication token.Defaults to true
, being the most optimal and
appropriate option (ie AnonymousProcessingFilter
will clear the token at the end of each request,
thus avoiding the session creation overhead in a typical configuration.
removeAfterRequest
- DOCUMENT ME!public void setUserAttribute(UserAttribute userAttributeDefinition)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |