Interface CaptchaManager

All Known Implementing Classes:
DefaultCaptchaManager

public interface CaptchaManager
  • Field Details

    • DEBUG_CAPTCHA

      static final String DEBUG_CAPTCHA
      In debug mode this is the token that the Captcha service will always accept
      See Also:
  • Method Details

    • validateCaptcha

      boolean validateCaptcha(String captchaId, String captchaResponse)
      validate captcha response
      Parameters:
      captchaId -
      captchaResponse -
      Returns:
      boolean
    • forceValidateCaptcha

      boolean forceValidateCaptcha(String captchaId, String captchaResponse)
    • isCaptchaEnabled

      boolean isCaptchaEnabled()
    • setCaptchaEnabled

      void setCaptchaEnabled(boolean value)
    • isDebugEnabled

      boolean isDebugEnabled()
    • setDebugMode

      void setDebugMode(boolean value)
      If true the captcha manager will accept "DEBUG" for every generated capthca and reject all other tokens. This is meant primarly for acceptance testing user interface elements with Captcha forms.

      If true the exclude list is ignored and a Captcha prompt is supplied for all requests

      Parameters:
      value -
    • getExclude

      String getExclude()
    • setExclude

      void setExclude(String value)
    • addCaptchaGroups

      Collection<String> addCaptchaGroups(Collection<String> selectedGroups)
      Method adds a Collection of group names to the existing groups for the captcha group setting.
      Parameters:
      selectedGroups - Collection of group names
      Returns:
      Collection of added group names
    • removeCaptchaGroup

      void removeCaptchaGroup(String group)
      Removes a group from the list of captcha groups
      Parameters:
      group - String
    • showCaptchaForCurrentUser

      boolean showCaptchaForCurrentUser()
      Determines whether a capture has to be shown for the currently logged in users
    • excludeNone

      void excludeNone()
    • excludeRegisteredUsers

      void excludeRegisteredUsers()
    • excludeGroups

      void excludeGroups()
    • setCaptchaGroups

      void setCaptchaGroups(Collection<String> groupList)
    • isCaptchaAvailable

      boolean isCaptchaAvailable()
    • setImageCaptchaService

      @Deprecated void setImageCaptchaService(com.octo.captcha.service.image.ImageCaptchaService imageCaptchaService)
      Deprecated.
      since 8.7
    • getImageCaptchaService

      @Deprecated com.octo.captcha.service.image.ImageCaptchaService getImageCaptchaService()
      Deprecated.
      since 8.7
    • generateCaptchaId

      String generateCaptchaId()
      Returns:
      a new captchaId