Download the PHP package nswdpc/silverstripe-recaptcha-v3 without Composer

On this page you can find all versions of the php package nswdpc/silverstripe-recaptcha-v3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package silverstripe-recaptcha-v3

Silverstripe reCAPTCHA V3 verification

This module handles verification of the quality of website interactions using reCAPTCHA v3. It contains a form field that can be added to a form manually or added automatically via a Spam Protector configuration.

You can also use the module to verify tokens/actions from non-form interactions with your website.

The default score for verification is 0.5, you can change this in project configuration

Features

Installation

Install via composer

Requirements

See composer.json

Form spam protection

Manually

Add the field to the form as you would any other FormField:

Spam Protector

To set RecaptchaV3SpamProtector as default spam protector, add the following configuration section to your project configuration

Then calling $form->enableSpamProtection() will add the field to the form automatically. Read the silverstripe/spamprotection documentation for more information on how this works.

Field for silverstripe/userforms modules

The module nswdpc/silverstripe-recaptcha-v3-userforms provides a userforms field

Further documentation

Configuration

To use the module, create a reCAPTCHA V3 site at the reCAPTCHA Admin website, once created your will be provided a site and secret key for that site both valid for the domains you add (and their subdomains).

It's a good idea to have site settings split between your environments to isolate the keys. In the reCAPTCHA site settings, add the domain(s) for the environment you are setting up along with any other desired options and Google users you share the project with.

Copy the site/secret key provided to your project configuration, e.g a spamprotection.yml file in your project _config directory.

Token retrieval

The behaviour triggering a token retrieval from the reCAPTCHAv3 API is a focus() event on the form. This avoids submit event race conditions with e.g frontend form validators.

Safari does not support focus event on form elements such as radios and checks. A change() event handler is used to support this.

When the first field in a form is focused, a token will be retrieved. If another field is focused in the form after the configured refresh time, the token will be refreshed.

The latest token will be submitted with the form and validated, if it has expired (tokens have a 2 minute lifetime), the visitor will be prompted to check and resubmit the form with a fresh token.

Token values are verified and give a score by the reCAPTCHAv3 API. Scores that meet the minimum threshold requirements will pass validation.

License

BSD-3-Clause

Maintainers

Bugtracker

We welcome bug reports, pull requests and feature requests on the Github Issue tracker for this project.

Please review the code of conduct prior to opening a new issue.

Security

If you have found a security issue with this module, please email digital[@]dpc.nsw.gov.au in the first instance, detailing your findings.

Development and contribution

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.

Please review the code of conduct prior to completing a pull request.


All versions of silverstripe-recaptcha-v3 with dependencies

PHP Build Version
Package Version
Requires silverstripe/spamprotection Version ^4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nswdpc/silverstripe-recaptcha-v3 contains the following files

Loading the files please wait ....