jycr753 / password-strength-checker
进行计算,让用户对密码输入有直观的响应
0.2
2016-07-03 11:42 UTC
Requires
- illuminate/support: ^5.2
- vlucas/phpdotenv: ^2.2
Requires (Dev)
- orchestra/testbench: ^3.1
- phpspec/phpspec: ^2.5
- phpunit/phpunit: ^5.3
This package is auto-updated.
Last update: 2024-09-11 20:26:44 UTC
README
文档
安装
要安装,请运行composer
composer require jycr753/password-strength-checker
注册服务提供者
jycr753\PasswordStrengthChecker\ServiceProvider::class,
发布配置文件以自定义包
php artisan vendor:publish --provider="Vendor\jycr753\PasswordStrengthChecker\ServiceProvider" --tag="config"
使用方法
在类中导入包
use jycr753\PasswordStrengthChecker\ServiceProvider as PSC;
方法使用示例
public function passwordCheck(Request $request)
{
$password = $request->get('password');
$score = PSC::check($password);
return [$score];
}
输出示例
[
{
"data": {
"score": 104,
"strength": 4,
"text": "Very Strong"
}
}
]
配置
贡献
错误报告
所有问题都受欢迎,为了创建更好的产品,但您的问题应包含标题和问题的清晰描述。您还应包括尽可能多的相关信息和一个演示问题的代码示例。
哪个分支?
所有错误修复应发送到develop分支。错误修复永远不会发送到master。
安全漏洞
如果您在此包中发现安全漏洞,请发送电子邮件到 developer@jorgerodriguez.dk 。
编码风格
我们的项目遵循PSR-2编码标准和PSR-4自动加载标准。
StyleCI
StyleCI会自动修复代码风格以符合标准。
许可
Copyright 2016 Jorge Rodriguez(jycr753) and other contributors:
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.