O'Reilly logo

Spring Security 3.x Cookbook by Anjana Mankale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Spring Security with Captcha integration

Let us demonstrate the integration of Spring Security with Captcha. We have downloaded a Kaptcha.jar Captcha provider for this purpose. We need to install the jar file into the maven local repository for the application to work.

The example is an extension of the previous recipe where an additional input, mobile number, was considered for authorization and authentication by Spring Security. In this example, we will get the code for username and password from the user along with the Captcha code. The username is authenticated against the database, and the requested Captcha and the Captcha entered by the user are also compared.

When the entire conditions match, the user is said to be authenticated or else the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required