nojimage/cakephp-login-attempts
Composer 安装命令:
composer require nojimage/cakephp-login-attempts
包简介
LoginAttempts plugin for CakePHP
README 文档
README
Requirements
- CakePHP >= 5.0
- CakePHP Authentication plugin
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require nojimage/cakephp-login-attempts:^3.0
Load plugin
Run the following command:
bin/cake plugin load LoginAttempts
Create table
Run migration command:
bin/cake migrations migrate -p LoginAttempts
Usage
Use LoginAttempts.Form authenticator instead of Form.
If you are using Authentication plugin:
$service->loadAuthenticator('LoginAttempts.Form', [ 'fields' => ['username' => 'email'], 'attemptLimit' => 5, 'attemptDuration' => '+5 minutes', ]);
LoginAttempts.Form Options
attemptLimit
If the number of login failures exceeds attemptLimit during attemptDuration,
the user's login is not permitted.
default: 5
attemptDuration
If the number of login failures exceeds attemptLimit during attemptDuration,
the user's login is not permitted.
default: '+5 minutes'
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.
default: 'login'
attemptsStorageModel
A model used for logging login failures and checking the count of failed login attempts.
default: 'LoginAttempts.Attempts'
nojimage/cakephp-login-attempts 适用场景与选型建议
nojimage/cakephp-login-attempts 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14.94k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2017 年 06 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 nojimage/cakephp-login-attempts 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nojimage/cakephp-login-attempts 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 14.94k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-12