org.acegisecurity.captcha
Class CaptchaValidationProcessingFilter

java.lang.Object
  extended by org.acegisecurity.captcha.CaptchaValidationProcessingFilter
All Implemented Interfaces:
Filter, InitializingBean

public class CaptchaValidationProcessingFilter
extends Object
implements InitializingBean, Filter

Filter for web integration of the CaptchaServiceProxy.
It basically intercept calls containing the specific validation parameter, use the CaptchaServiceProxy to validate the request, and update the CaptchaSecurityContext if the request passed the validation.
This Filter should be placed after the ContextIntegration filter and before the CaptchaChannelProcessorTemplate filter in the filter stack in order to update the CaptchaSecurityContext before the humanity verification routine occurs.
This filter should only be used in conjunction with the CaptchaSecurityContext

Version:
$Id: CaptchaValidationProcessingFilter.java 1496 2006-05-23 13:38:33Z benalex $
Author:
marc antoine Garrigue

Field Summary
protected static Log logger
           
 
Constructor Summary
CaptchaValidationProcessingFilter()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
          Does nothing.
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
           
 CaptchaServiceProxy getCaptchaService()
           
 String getCaptchaValidationParameter()
           
 void init(FilterConfig filterConfig)
          Does nothing.
 void setCaptchaService(CaptchaServiceProxy captchaService)
           
 void setCaptchaValidationParameter(String captchaValidationParameter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Log logger
Constructor Detail

CaptchaValidationProcessingFilter

public CaptchaValidationProcessingFilter()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

destroy

public void destroy()
Does nothing. We use IoC container lifecycle services instead.

Specified by:
destroy in interface Filter

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
Specified by:
doFilter in interface Filter
Throws:
IOException
ServletException

getCaptchaService

public CaptchaServiceProxy getCaptchaService()

getCaptchaValidationParameter

public String getCaptchaValidationParameter()

init

public void init(FilterConfig filterConfig)
          throws ServletException
Does nothing. We use IoC container lifecycle services instead.

Specified by:
init in interface Filter
Parameters:
filterConfig - ignored
Throws:
ServletException - ignored

setCaptchaService

public void setCaptchaService(CaptchaServiceProxy captchaService)

setCaptchaValidationParameter

public void setCaptchaValidationParameter(String captchaValidationParameter)


Copyright © 2004-2006 Acegi Technology Pty Limited. All Rights Reserved.