org.acegisecurity.captcha
Class CaptchaValidationProcessingFilter

java.lang.Object
  extended by org.acegisecurity.captcha.CaptchaValidationProcessingFilter
All Implemented Interfaces:
javax.servlet.Filter, org.springframework.beans.factory.InitializingBean

public class CaptchaValidationProcessingFilter
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, javax.servlet.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 1784 2007-02-24 21:00:24Z luke_t $
Author:
marc antoine Garrigue

Field Summary
protected static org.apache.commons.logging.Log logger
           
 
Constructor Summary
CaptchaValidationProcessingFilter()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
          Does nothing.
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
           
 CaptchaServiceProxy getCaptchaService()
           
 java.lang.String getCaptchaValidationParameter()
           
 void init(javax.servlet.FilterConfig filterConfig)
          Does nothing.
 void setCaptchaService(CaptchaServiceProxy captchaService)
           
 void setCaptchaValidationParameter(java.lang.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 org.apache.commons.logging.Log logger
Constructor Detail

CaptchaValidationProcessingFilter

public CaptchaValidationProcessingFilter()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

destroy

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

Specified by:
destroy in interface javax.servlet.Filter

doFilter

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

getCaptchaService

public CaptchaServiceProxy getCaptchaService()

getCaptchaValidationParameter

public java.lang.String getCaptchaValidationParameter()

init

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

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

setCaptchaService

public void setCaptchaService(CaptchaServiceProxy captchaService)

setCaptchaValidationParameter

public void setCaptchaValidationParameter(java.lang.String captchaValidationParameter)


Copyright © 2004-2012 Interface21, Inc. All Rights Reserved.