Anton Johansson :: Google reCAPTCHA Widget for Vaadin

Provides a simple Google reCAPTCHA v2 component for Vaadin.

License

License

Categories

Categories

Ant Build Tools Vaadin User Interface Web Frameworks
GroupId

GroupId

com.anton-johansson
ArtifactId

ArtifactId

vaadin-recaptcha
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

bundle
Description

Description

Anton Johansson :: Google reCAPTCHA Widget for Vaadin
Provides a simple Google reCAPTCHA v2 component for Vaadin.
Project URL

Project URL

https://github.com/anton-johansson/vaadin-recaptcha
Project Organization

Project Organization

Source Code Management

Source Code Management

https://github.com/anton-johansson/vaadin-recaptcha

Download vaadin-recaptcha

Dependencies

compile (1)

Group / Artifact Type Version
com.vaadin : vaadin-server jar 7.6.6

Project Modules

There are no modules declared in this project.

Google reCAPTCHA 2 Component for Vaadin

Build Status Maven Central Javadoc License

Provides a simple Google reCAPTCHA v2 component for Vaadin. See https://developers.google.com/recaptcha/ for more information.

Usage

  1. Generate your reCAPTCHA keys on http://www.google.com/recaptcha/intro/index.html

  2. Include the artifact in your POM:

    <dependency>
    	<groupId>com.anton-johansson<groupId>
    	<artifactId>vaadin-recaptcha</artifactId>
    	<version>2.0.0</version>
    </dependency>
  3. Include the reCAPTCHA JavaScript in your UI:

    @JavaScript("https://www.google.com/recaptcha/api.js")
    public class CustomUI extends UI
    {
        ...
    }
  4. Add the Recaptcha-component to your UI:

    String siteKey = "...";
    String secretKey = "...";
    Recaptcha captcha = new Recaptcha(siteKey, secretKey);
    layout.addComponent(captcha);
  5. Optionally set extra properties on your component:

    captcha.setType(RecaptchaType.AUDIO);
    captcha.setTheme(RecaptchaTheme.DARK);
    captcha.setSize(RecaptchaSize.COMPACT);
  6. Validate the user input:

    if (!captcha.isVerified())
    {
        ...
    }

License

Apache License © Anton Johansson

Versions

Version
2.0.0