Download the PHP package crevillo/ezplatform-captcha without Composer

On this page you can find all versions of the php package crevillo/ezplatform-captcha. 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 ezplatform-captcha

eZ Platform Captcha

One of the request me and my teammates at The Cocktail receive in the last times is to have a captcha mechanism in the admin login form and also in the recover password form.

This bundle allows this possibility taking advantage of the gregwar/captcha-bundle and gregwar-captcha packages.

What this bundle does

To add captcha to those forms, it works different depending on the form

login form

in eZ Platform, login form is not a Symfony Form. Instead, is a normal form that you can see in the login.html.twig template.

This makes impossible to extend this from from a php class. This is why, this bundles adds is own security controller and templates, so the captcha can be shown

When the login_form option for the bundle is set to true, the compiler pass will change some definitions.

In the SecurityController we use the Captcha library to create the captcha image. This image is sent to the template. Besides, once is generated, the phrase is stored in session.

There's also an override for the UsernamePasswordFormAuthenticationListener that checks for this session variable and compares its value to the one provided in the form field.

If there's no match, a exception is thrown. If there's, all goes as before.

forgot password form

On the other hand, there's a symfony form for the forgot password functionality. So, in this case we opt to add a Form Type Extension that will add a Captcha Field Type.

This Form Type Extension is only added to the container when the option is enabled.

Install

To install this bundle require this package with composer

composer require crevillo/ezplatform-captcha

then, you will need to enable the Gregwar Captcha Bundle and also this bundle in your AppKernel file

Configuration

Add the following configuration to your app/config/config.yml:

gregwar_captcha: ~
crevillo_ez_captcha: ~

Usage

To have captcha in the forms you have to explicity enable this options. Modify your app/config/config.yml

crevillo_ez_captcha:
    login_form: true
    forgot_password_form: true

You can disable captcha protection just setting one or both values to false

Options

For now you can define custom width and height for the captcha, but please take in account this will only work for the login form. For the other one, you can follow the instructions at Gregwar Captcha Bundle documentation


All versions of ezplatform-captcha with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
gregwar/captcha-bundle Version 2.*
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 crevillo/ezplatform-captcha contains the following files

Loading the files please wait ....