This document describes integrating reCaptcha with CAS. reCaptcha is a free CAPTCHA service that helps to digitize books, newspapers and old time radio shows. This tutorial uses the recaptch4j library to access the reCaptcha service. The version of CAS used in this tutorial is 3.4.11. This tutorial was based on another by Axel Mendoza Pupo that covered JCAPTCHA integration.
The following changes need to be made to
Add the following file to
Note the reCaptchaPublicKey is exposed in the context here as a bean for reference in the view.
Add reCaptcha keys to properties file
Add reCaptcha to casLoginView.jsp
Note the reCaptchaPublicKey bean is referenced here.
Add reCaptcha4j dependency in pom.xml