Interface CaptchaManager

    • Method Detail

      • validateCaptcha

        boolean validateCaptcha​(String captchaId,
                                String captchaResponse)
        validate captcha response
        Parameters:
        captchaId -
        captchaResponse -
        Returns:
        boolean
      • 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 addCaptchaGroups​(Collection 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 groupList)
      • isCaptchaAvailable

        boolean isCaptchaAvailable()
      • setImageCaptchaService

        void setImageCaptchaService​(com.octo.captcha.service.image.ImageCaptchaService imageCaptchaService)
      • getImageCaptchaService

        com.octo.captcha.service.image.ImageCaptchaService getImageCaptchaService()
      • generateCaptchaId

        String generateCaptchaId()
        Returns:
        a new captchaId