Interface ICaptchaSecurityService
- All Known Implementing Classes:
CaptchaSecurityService
public interface ICaptchaSecurityService
The interface for Captcha security service
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturn an EMPTY_STRING if service is not available nor activebooleanisActive()booleanvoidsetActive(boolean bActive) Activate the service for the current clientbooleanvalidate(javax.servlet.http.HttpServletRequest request) Validates a captcha only if the service is available and active
-
Field Details
-
EMPTY_STRING
- See Also:
-
-
Method Details
-
getHtmlCode
String getHtmlCode()Return an EMPTY_STRING if service is not available nor active- Returns:
- the html code of a captcha
-
getActiveBlockHtml
String getActiveBlockHtml()- Returns:
- the html code used by an admin to activate the captcha
-
validate
boolean validate(javax.servlet.http.HttpServletRequest request) Validates a captcha only if the service is available and active- Parameters:
request- the request, which must contain the parameter j_captcha_response- Returns:
- true if captcha is valid or service is not available
-
setActive
void setActive(boolean bActive) Activate the service for the current client- Parameters:
bActive- True to activate, otherwise false
-
isAvailable
boolean isAvailable()- Returns:
- true if a captcha security service is loaded
-
isActive
boolean isActive()- Returns:
- true if the service is active for the current client
-