Interface Captcha

  • All Known Implementing Classes:
    WrappedScriptCaptcha

    @Role
    public interface Captcha
    Describes a CAPTCHA that is able to display a challenge and validate and answer for the current context (i.e. user, request, XWiki Context, etc.).
    Since:
    10.8RC1
    Version:
    $Id: fb9ff10f1991f418ccd0e4e5bc1ec820dd1c6fa0 $
    • Method Detail

      • display

        String display​(Map<String,​Object> parameters)
                throws CaptchaException
        Parameters:
        parameters - the configuration values to override when displaying the CAPTCHA. Missing parameters value are taken from the CAPTCHA's configuration
        Returns:
        the generated and displayed CAPTCHA challenge for the current context using the given parameters to override the configuration
        Throws:
        CaptchaException - in case of problems
      • isValid

        boolean isValid()
                 throws CaptchaException
        Returns:
        true if the CAPTCHA answer passed to the current context is valid; false otherwise
        Throws:
        CaptchaException - in case of problems
      • isValid

        boolean isValid​(Map<String,​Object> parameters)
                 throws CaptchaException
        Parameters:
        parameters - the configuration values to override when validating the CAPTCHA's answer. Missing parameters value are taken from the CAPTCHA's configuration
        Returns:
        true if the CAPTCHA answer passed to the current context, using the given parameters to override the configuration, is valid; false otherwise
        Throws:
        CaptchaException - in case of problems