reCAPTCHA Spring Integration

reCAPTCHA Integration into Spring Framework

License

License

GroupId

GroupId

com.github.dtrunk90
ArtifactId

ArtifactId

recaptcha-spring-integration
Last Version

Last Version

2.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

reCAPTCHA Spring Integration
reCAPTCHA Integration into Spring Framework
Project URL

Project URL

https://github.com/dtrunk90/recaptcha-spring-integration
Source Code Management

Source Code Management

https://github.com/dtrunk90/recaptcha-spring-integration

Download recaptcha-spring-integration

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.dtrunk90/recaptcha-spring-integration/ -->
<dependency>
    <groupId>com.github.dtrunk90</groupId>
    <artifactId>recaptcha-spring-integration</artifactId>
    <version>2.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.dtrunk90/recaptcha-spring-integration/
implementation 'com.github.dtrunk90:recaptcha-spring-integration:2.0.1'
// https://jarcasting.com/artifacts/com.github.dtrunk90/recaptcha-spring-integration/
implementation ("com.github.dtrunk90:recaptcha-spring-integration:2.0.1")
'com.github.dtrunk90:recaptcha-spring-integration:jar:2.0.1'
<dependency org="com.github.dtrunk90" name="recaptcha-spring-integration" rev="2.0.1">
  <artifact name="recaptcha-spring-integration" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.dtrunk90', module='recaptcha-spring-integration', version='2.0.1')
)
libraryDependencies += "com.github.dtrunk90" % "recaptcha-spring-integration" % "2.0.1"
[com.github.dtrunk90/recaptcha-spring-integration "2.0.1"]

Dependencies

compile (7)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-databind jar 2.9.6
javax.servlet : javax.servlet-api jar 4.0.1
javax.validation : validation-api jar 2.0.1.Final
org.slf4j : slf4j-api jar 1.7.25
org.springframework : spring-webmvc jar 5.0.9.RELEASE
org.springframework.boot : spring-boot-autoconfigure jar 2.0.5.RELEASE
org.springframework.security : spring-security-core jar 5.0.8.RELEASE

test (5)

Group / Artifact Type Version
junit : junit jar 4.12
org.glassfish : javax.el jar 3.0.0
org.hibernate : hibernate-validator jar 6.0.13.Final
org.slf4j : slf4j-simple jar 1.7.25
org.springframework : spring-test jar 5.0.9.RELEASE

Project Modules

There are no modules declared in this project.

reCAPTCHA Spring Integration

<dependency>
	<groupId>com.github.dtrunk90</groupId>
	<artifactId>recaptcha-spring-integration</artifactId>
	<version>2.0.1</version>
</dependency>

Usage

Simply extend your @ModelAttribute (important!) and @Valid annotated Form object from AbstractRecaptchaForm. Alternatively, if the default doesn't fit your needs you can add your own @Recaptcha annotated field/method. Per default authenticated users will be skipped. So you don't need to display the widget if the user is authenticated. Add the mandatory properties to your project (the URL is optional):

Property Default value
recaptcha.secret-key
recaptcha.site-key
recaptcha.verify-url https://www.google.com/recaptcha/api/siteverify

Do the client side implementation as described here for reCAPTCHA v2 or here for Invisible reCAPTCHA.

In case you don't use Spring Boots autoconfiguration feature you have to configure it yourself. Take a look into RecaptchaAutoConfiguration for more information.

Versions

Version
2.0.1
2.0.0
1.0.0