flag_redCAPTCHA implementation using JCaptcha
TypeXAR
CategoryApplication
Developed by

XWiki Development Team

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Standard (XWiki 10.8RC1+)

Compatibility

XWiki 10.8RC1+

Installable with the Extension Manager

Description

Extension to the CAPTCHA Application using the JCaptcha offline library.

This extension uses the latest JCaptcha 2.0-alpha1 release that is still available. While the JCaptcha project is currently unmaintained, the library continues to function very well and is powerful and extensible enough to produce quality CAPTCHAs in 3 different formats:

  • Image
  • Sound
  • Text

From the "Administration >> CAPTCHA" section, you can enable and configure the JCaptcha Application and select which CAPTCHA type you want to use and which implementation for the specified type:

captcha-jcaptcha-options.png

Each displayed CAPTCHA can be refreshed, in case it is not readable enough.

Available Implementations

The JCaptcha Application exposes the standard provided CaptchaEngine implementations for each type:

Image

  • Default Gimpy (Gmail)

    captcha-jcaptcha-image-default-gimpy.png

  • Simple List

    captcha-jcaptcha-image-simpleList.png

  • Non Linear Text Gimpy

    captcha-jcaptcha-image-nonLinearTextGimpy.png

  • Hotmail

    captcha-jcaptcha-image-hotmail.png

  • Deformed Baffle List Gimpy

    captcha-jcaptcha-image-deformedBaffleListGimpy.png

  • Baffle List Gimpy

    captcha-jcaptcha-image-baffleListGimpy.png

  • Hotmail 2008

    captcha-jcaptcha-image-hotmail2008.png

Sound

Sound CAPTCHAs are displayed generically with a "Listen" button, but the sound played depends on the implementation you choose:
captcha-jcaptcha-sound.png

  • Speller
  • Simple List

Text

  • Simple Math

    captcha-jcaptcha-text-simpleMath.png

Custom Implementation

The JCaptcha API allows you to implement your own CaptchaEngine, giving you complete freedom in how you want to generate and display your CAPTCHA.

A very basic example you can have a look at is SimpleMathCaptchaEngine which just extends GenericCaptchaEngine and exposes the MathCaptchaFactory, which,in turn, is a TextCaptchaFactory and the CaptchaFactory is really the one in charge of generating a CAPTCHA. A CaptchaEngine can have one or more factories which are usually selected by random when generating a new CAPTCHA.

The easiest and recommended way to understanding how to implement your own CAPTCHA is to have a look at the sources of the standard provided implementations for each type:

Once you're happy with the custom CaptchaEngine implementation that you have produced, head over to "Administrations >> CAPTCHA", select the type of CAPTCHA your engine produces (image/sound/text) and check "Custom" while providing in the text input next to it the full Java class name (package.class) for your implementation. Be aware that your implementation needs to have a no-parameter constructor so that it can easily be instantiated and used.

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Dependencies

Dependencies for this extension (org.xwiki.platform:xwiki-platform-captcha-jcaptcha-ui 10.8-rc-1):

Tags:
Created by Eduard Moraru on 2018/09/14 19:09
    

Get Connected