2017 © Pedro Peláez
 

library yii2-check-login-attempts

Disable login after multiple failures.

image

giannisdag/yii2-check-login-attempts

Disable login after multiple failures.

  • Monday, January 8, 2018
  • by giannisdag
  • Repository
  • 1 Watchers
  • 6 Stars
  • 66 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 6 Versions
  • 69 % Grown

The README.md

yii2-check-login-attempts

this is a checker for login attempts, (*1)

based on https://github.com/ethercreative/yii2-login-attempts-behavior, (*2)

Installation

The preferred way to install this extension is through composer. Either run, (*3)

composer require giannisdag/yii2-check-login-attempts, (*4)

or add, (*5)

"giannisdag/yii2-check-login-attempts": "*", (*6)

to the require section of your composer.json file., (*7)

Usage

Run the following migration, (*8)

php yii migrate --migrationPath="@vendor/giannisdag/yii2-check-login-attempts/src/migrations"  --interactive=0

Add the behavior to your login model ```php public function behaviors() { $behaviors = parent::behaviors();, (*9)

    $behaviors[] = [
         'class' => '\giannisdag\yii2CheckLoginAttempts\behaviors\LoginAttemptBehavior',

        // Amount of attempts in the given time period
        'attempts' => 3,

        // the duration, in seconds, for a regular failure to be stored for
        // resets on new failure
        'duration' => 300,

        // the duration, in seconds, to disable login after exceeding `attemps`
        'disableDuration' => 900,

        // the attribute used as the key in the database
        // and add errors to
        'usernameAttribute' => 'username',

        // the attribute to check for errors
        'passwordAttribute' => 'password',

        // the validation message to return to `usernameAttribute`
        'message' => Yii::t('app', 'Login disabled'),
    ];

    return $behaviors;
}

The Versions

08/01 2018

dev-master

9999999-dev

Disable login after multiple failures.

  Sources   Download

The Requires

 

by Giannis Dagkoulis

yii2 behavior

08/01 2018

v1.1.2

1.1.2.0

Disable login after multiple failures.

  Sources   Download

The Requires

 

by Giannis Dagkoulis

yii2 behavior

23/12 2017

v1.1.1

1.1.1.0

Disable login after multiple failures.

  Sources   Download

The Requires

 

by Giannis Dagkoulis

yii2 behavior

23/12 2017

v1.1

1.1.0.0

Disable login after multiple failures.

  Sources   Download

The Requires

 

by Giannis Dagkoulis

yii2 behavior

23/12 2017

dev-add-license-1

dev-add-license-1

Disable login after multiple failures.

  Sources   Download

The Requires

 

by Giannis Dagkoulis

yii2 behavior

22/12 2017

v1.0

1.0.0.0

Disable login after multiple failures.

  Sources   Download

The Requires

 

by Giannis Dagkoulis

yii2 behavior