diegomagikal/laravel-password
Composer 安装命令:
composer require diegomagikal/laravel-password
包简介
Protect your users from entering dumb and common passwords
关键字:
README 文档
README
Guard your users from security problems by preventing them from having dumb passwords
Introduction
This package can be used to verify the user provided password is not one of the top 10,000 worst passwords as analyzed by a respectable IT security analyst. Read about all here, here(wired) or here(telegram)
Installation
PHP 5.5+ or HHVM 3.3+, and Composer are required.
To get the latest version of Laravel Password, simply add the following line to the require block of your composer.json file.
"diegomagikal/laravel-password": "*"
You'll then need to run composer install or composer update to download it and have the autoloader updated.
- If you're on Laravel 5.5 or above, that's all you need to do! Check out the usage examples below.
- If you're on Laravel < 5.5, you'll need to register the service provider. Open up
config/app.phpand add the following to theprovidersarray:
DiegoMagikal\CheckPassword\CheckPasswordServiceProvider::class
Usage
Use the rule checkpassword in your validation like so:
/** * Get a validator for an incoming registration request. * * @param array $data * @return \Illuminate\Contracts\Validation\Validator */ protected function validator(array $data) { return Validator::make($data, [ 'name' => 'required|max:255', 'email' => 'required|email|max:255|unique:users', 'password' => 'required|min:6|checkpassword|confirmed', ]); }
Error shows on the page like so:
By default, the error message returned is This password is just too common. Please try another!.
You can customize the error message by opening resources/lang/en/validation.php and adding to the array like so:
'checkpassword' => 'You are using a dumb password abeg',
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
Inspiration
How can I thank you?
Why not star the github repo? I'd love the attention!
License
The MIT License (MIT). Please see License File for more information.
diegomagikal/laravel-password 适用场景与选型建议
diegomagikal/laravel-password 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 48 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 10 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「security」 「password」 「easy」 「passwords」 「dumb」 「facile」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 diegomagikal/laravel-password 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 diegomagikal/laravel-password 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 diegomagikal/laravel-password 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Secure payment processing via PayU MEA for Magento 2.3
Easy, flexible and lightweight news extension. No extra tables needed, using pages for news articles.
The PHP class PasswordGenerator serves as a password generator to create memorable passwords like the keychain of macOS ≤ 10.14 did.
Provide a way to secure accesses to all routes of an symfony application.
使用简单实用的语义化接口快速读写Excel文件
Laravel middleware to restrict a site or specific routes using HTTP basic authentication
统计信息
- 总下载量: 48
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-07

