Introduction

SimpleCaptcha is a Java library for generating CAPTCHA challenge/answer pairs. SimpleCaptcha is intended to be easy to implement and use sensible defaults, while providing easily-accesssible hooks for customization.

The SimpleCaptcha module provides the user with the ability to integrate a captcha verification mechanism in his application.

Integration

The integration with the Nemesis platform is pretty straight-forward. Upon adding the module in the classpath,

<dependency>
    <groupId>io.nemesis.platform.module.captcha</groupId>
    <artifactId>nemesis-module-simplecaptcha</artifactId>
</dependency>

you will have access to several new properties you can use to customize its behaviour. All of them are located under the nemesis.captcha.simplecaptcha domain. Please consult the SimpleCaptcha documentation on what they mean and how to use them.

In order for the module to be working as expected, there are set of configuration steps that need to be applied in the user application.

  • The SimpleCaptcha module needs to be added as a dependency

  • The SimpleCaptcha tag needs to be added as a dependency to the login file

<%@ taglib prefix="captcha" uri="http://www.nemesis.com/tags/simplecaptcha/" %>

After adding this line we can proceed with the captcha tag itself

<captcha:display failedAttempts="2"/>

- The failedAttempts attribute here sets the amount of failed attempts which will trigger and show the captcha tag.
  • In the application.properties file of the application, needs to be added the url path for the SimpleCaptcha servlet. This is done so that the pathLocaleFilter can pick up the selected path and exclude the locale from the url.

nemesis.cms.pathLocaleFilterExcludeUrls=/simpleImg