mralston/lockout
Composer 安装命令:
composer require mralston/lockout
包简介
Locks user accounts after a set number of failed login attempts.
README 文档
README
Locks user accounts and IP addresses after repeated failed login attempts.
Installation
You can install the package via composer:
composer require mralston/lockout
You can publish and run the migrations with:
php artisan vendor:publish --provider="Mralston\Lockout\LockoutServiceProvider" --tag="lockout-migrations" php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="Mralston\Lockout\LockoutServiceProvider" --tag="lockout-config"
This is the contents of the published config file:
return [ 'max_attempts_user' => env('MAX_LOGIN_ATTEMPTS_USER', 10), 'max_attempts_ip' => env('MAX_LOGIN_ATTEMPTS_IP', 20), 'lockout_duration_user' => env('LOCKOUT_DURATION_USER', 15 * 60), 'lockout_duration_ip' => env('LOCKOUT_DURATION_IP', 60 * 60 * 24 * 7), ];
Basic Usage
The package will automatically block a user account or IP address after too many failed attempts within the specified time interval.
MAX_LOGIN_ATTEMPTS_USER determines how many failed logins should be permitted for a specific user before being locked out.
MAX_LOGIN_ATTEMPTS_IP determines how many failed logins should be permitted from a specific IP address before being locked out.
LOCKOUT_DURATION_USER determines how long a user account should be locked for. Set to zero or null for a permanent ban.
LOCKOUT_DURATION_IP determines how long an IP address should be locked for. Set to zero or null for a permanent ban.
Unlocking Users & IP addresses
A locked user account or IP address can be manually unlocked using the following commands:
php artisan lockout:unlock --user=123 php artisan lockout:unlock --email=somebody@example.com php artisan lockout:unlock --ip=1.2.3.5
Maintenance
Stale records of failed authentication attempts can be pruned with the following command, which can be run manually or through the scheduler:
php artisan lockout:prune
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
mralston/lockout 适用场景与选型建议
mralston/lockout 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 604 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 10 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「lockout」 「mralston」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mralston/lockout 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mralston/lockout 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mralston/lockout 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Put your Laravel application into read-only mode.
Put your Laravel application into read-only mode. (forked from rappasoft/lockout)
Temporarily lock certain users out of the control panel.
Laravel wrapper for generating PDF files using headless Chrome/Chromium
Package for working with IQ CRM.
Library for working with My Utility Genius API.
统计信息
- 总下载量: 604
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-10-27