Download the PHP package giannisdag/yii2-check-login-attempts without Composer
On this page you can find all versions of the php package giannisdag/yii2-check-login-attempts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download giannisdag/yii2-check-login-attempts
More information about giannisdag/yii2-check-login-attempts
Files in giannisdag/yii2-check-login-attempts
Download giannisdag/yii2-check-login-attempts
More information about giannisdag/yii2-check-login-attempts
Files in giannisdag/yii2-check-login-attempts
Vendor giannisdag
Package yii2-check-login-attempts
Short Description Disable login after multiple failures.
License
Package yii2-check-login-attempts
Short Description Disable login after multiple failures.
License
Please rate this library. Is it a good library?
Informations about the package yii2-check-login-attempts
yii2-check-login-attempts
this is a checker for login attempts
based on https://github.com/ethercreative/yii2-login-attempts-behavior
Installation
The preferred way to install this extension is through composer. Either run
composer require giannisdag/yii2-check-login-attempts
or add
"giannisdag/yii2-check-login-attempts": "*"
to the require section of your composer.json file.
Usage
Run the following migration
Add the behavior to your login model
public function behaviors()
{
$behaviors = parent::behaviors();
$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;
}
All versions of yii2-check-login-attempts with dependencies
PHP Build Version
Package Version
Requires
yiisoft/yii2 Version
*
The package giannisdag/yii2-check-login-attempts contains the following files
Loading the files please wait ....