public abstract class CaptchaChannelProcessorTemplate extends Object implements ChannelProcessor, org.springframework.beans.factory.InitializingBean
CaptchaChannel template : Ensures the user has enough human privileges by review of the CaptchaSecurityContext and using an abstract routine isContextValidConcerningHumanity(CaptchaSecurityContext) (implemented by sub classes)
The component uses 2 main parameters for its configuration :
ChannelProcessingFilter configurationisContextValidConcerningHumanity(CaptchaSecurityContext) to evaluate whether the CaptchaSecurityContext is valid default value = 0| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
CaptchaChannelProcessorTemplate() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Verify if entryPoint and keyword are ok
|
void |
decide(FilterInvocation invocation,
ConfigAttributeDefinition config)
Decided whether the presented
FilterInvocation provides the appropriate level of channel
security based on the requested ConfigAttributeDefinition. |
ChannelEntryPoint |
getEntryPoint() |
String |
getKeyword() |
int |
getThresold() |
void |
setEntryPoint(ChannelEntryPoint entryPoint) |
void |
setKeyword(String keyword) |
void |
setThresold(int thresold) |
boolean |
supports(ConfigAttribute attribute)
Indicates whether this
ChannelProcessor is able to process the passed
ConfigAttribute. |
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException - if notpublic void decide(FilterInvocation invocation, ConfigAttributeDefinition config) throws IOException, javax.servlet.ServletException
ChannelProcessorFilterInvocation provides the appropriate level of channel
security based on the requested ConfigAttributeDefinition.decide in interface ChannelProcessorinvocation - DOCUMENT ME!config - DOCUMENT ME!IOException - DOCUMENT ME!javax.servlet.ServletException - DOCUMENT ME!public ChannelEntryPoint getEntryPoint()
public String getKeyword()
public int getThresold()
public void setEntryPoint(ChannelEntryPoint entryPoint)
public void setKeyword(String keyword)
public void setThresold(int thresold)
public boolean supports(ConfigAttribute attribute)
ChannelProcessorChannelProcessor is able to process the passed
ConfigAttribute.This allows the ChannelProcessingFilter to check every
configuration attribute can be consumed by the configured ChannelDecisionManager.
supports in interface ChannelProcessorattribute - a configuration attribute that has been configured against the
ChannelProcessingFilterChannelProcessor can support the passed configuration attributeCopyright © 2021. All rights reserved.