2017 © Pedro Peláez
 

cakephp-plugin cakephp-login-attempts

LoginAttempts plugin for CakePHP 3

image

nojimage/cakephp-login-attempts

LoginAttempts plugin for CakePHP 3

  • Friday, September 29, 2017
  • by nojimage
  • Repository
  • 1 Watchers
  • 1 Stars
  • 246 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 43 % Grown

The README.md

LoginAttempts plugin for CakePHP

Software License Build Status Codecov Latest Stable Version , (*1)

Requirements

  • CakePHP >= 3.5
  • (Optional) CakePHP Authentication plugin 1.x

Installation

You can install this plugin into your CakePHP application using composer., (*2)

The recommended way to install composer packages is:, (*3)

composer require nojimage/cakephp-login-attempts

Load plugin

(CakePHP >= 3.6.0) Load the plugin by adding the following statement in your project's src/Application.php:, (*4)

$this->addPlugin('LoginAttempts');

(CakePHP <= 3.5.x) Load the plugin by adding the following statement in your project's config/bootstrap.php file:, (*5)

Plugin::load('LoginAttempts');

Create table

run migration command:, (*6)

bin/cake migrations migrate -p LoginAttempts

Usage

Use LoginAttempts.Form authenticator instead of Form., (*7)

        $this->loadComponent('Auth', [
            'authenticate' => [
                'LoginAttempts.Form' => [
                    'fields' => ['username' => 'email'],
                    'attemptLimit' => 5,
                    'attemptDuration' => '+5 minutes',
                ],
            ],
        ]);

If use are using Authentication plugin:, (*8)

        $service->loadAuthenticator('LoginAttempts.Form', [
            'fields' => ['username' => 'email'],
            'attemptLimit' => 5,
            'attemptDuration' => '+5 minutes',
        ]);

LoginAttempts.Form Options

attemptLimit

If the num of login failures of the user exceeds attemptLimit during attemptDuration, the user's login is not permitted., (*9)

default: 5, (*10)

attemptDuration

If the num of login failures of the user exceeds attemptLimit during attemptDuration, the user's login is not permitted., (*11)

default: '+5 minutes', (*12)

attemptAction

The number of attempts is stored separately for this key. Use when there are multiple login forms and you want to set restrictions separately., (*13)

default: 'login', (*14)

attemptsStorageModel

A model used for logging a failure login and check count of failure login., (*15)

default: 'LoginAttempts.Attempts', (*16)

The Versions

29/09 2017

dev-develop

dev-develop

LoginAttempts plugin for CakePHP 3

  Sources   Download

MIT

The Requires

 

The Development Requires

27/09 2017

dev-master

9999999-dev

LoginAttempts plugin for CakePHP 3

  Sources   Download

MIT

The Requires

 

The Development Requires

27/09 2017

v1.0.2

1.0.2.0

LoginAttempts plugin for CakePHP 3

  Sources   Download

MIT

The Requires

 

The Development Requires

12/06 2017

v1.0.1

1.0.1.0

LoginAttempts plugin for CakePHP 3

  Sources   Download

MIT

The Requires

 

The Development Requires