Class CaptchaValidationInterceptor
java.lang.Object
de.hybris.platform.commercewebservicescommons.interceptor.CaptchaValidationInterceptor
- All Implemented Interfaces:
org.springframework.web.servlet.HandlerInterceptor
public class CaptchaValidationInterceptor
extends Object
implements org.springframework.web.servlet.HandlerInterceptor
To intercept these requests with annotation @CaptchaAware and do the captcha check validation if captchaCheckEnabled is true for the currentSite
If captcha token is need to be checked and check failed then exception will be thrown out
-
Constructor Summary
ConstructorsConstructorDescriptionCaptchaValidationInterceptor(CaptchaValidationService captchaValidationService, BaseSiteService baseSiteService, BaseStoreService baseStoreService) -
Method Summary
Modifier and TypeMethodDescriptionprotected BaseSiteServiceprotected BaseStoreServiceprotected CaptchaAwaregetCaptchaAwareAnnotation(Object handler) protected CaptchaValidationServicebooleanpreHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler) To intercept these requests with annotation @CaptchaAware and do the captcha check validation if captchaCheckEnabled is true for the currentSite If captcha token is need to be checked and checked failed then exception will be thrown outMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.servlet.HandlerInterceptor
afterCompletion, postHandle
-
Constructor Details
-
CaptchaValidationInterceptor
public CaptchaValidationInterceptor(CaptchaValidationService captchaValidationService, BaseSiteService baseSiteService, BaseStoreService baseStoreService)
-
-
Method Details
-
preHandle
public boolean preHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler) To intercept these requests with annotation @CaptchaAware and do the captcha check validation if captchaCheckEnabled is true for the currentSite If captcha token is need to be checked and checked failed then exception will be thrown out- Specified by:
preHandlein interfaceorg.springframework.web.servlet.HandlerInterceptor- Parameters:
request- current HTTP requestresponse- current HTTP responsehandler- chosen handler to execute, for type and/or instance evaluation- Returns:
- true if the execution chain should proceed with the next interceptor or the handler itself. Else, DispatcherServlet assumes that this interceptor has already dealt with the response itself.
- Throws:
IllegalArgumentExceptionNotFoundExceptionCaptchaTokenMissingExceptionCaptchaValidationException
-
getCaptchaAwareAnnotation
-
getCaptchaValidationService
-
getBaseSiteService
-
getBaseStoreService
-