Interface ICaptchaSecurityService

All Known Implementing Classes:
CaptchaSecurityService

public interface ICaptchaSecurityService
The interface for Captcha security service
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Return an EMPTY_STRING if service is not available nor active
    boolean
     
    boolean
     
    void
    setActive(boolean bActive)
    Activate the service for the current client
    boolean
    validate(jakarta.servlet.http.HttpServletRequest request)
    Validates a captcha only if the service is available and active
  • Field Details

  • 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(jakarta.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