locastic/zxcvbn-password-validator
Composer 安装命令:
composer require locastic/zxcvbn-password-validator
包简介
Realistic Symfony password strength validator based on Zxcvbn PHP
README 文档
README
Realistic Symfony password strength validator based on Dropbox's zxcvbn project.
Overview
Zxcvbn-PHP is a password strength estimator using pattern matching and minimum entropy calculation. Zxcvbn-PHP is based on the Javascript zxcvbn project from Dropbox and @lowe. "zxcvbn" is bad password, just like "qwerty" and "123456".
More info here.
zxcvbn attempts to give sound password advice through pattern matching and conservative entropy calculations. It finds 10k common passwords, common American names and surnames, common English words, and common patterns like dates, repeats (aaa), sequences (abcd), and QWERTY patterns.
This validator is based on library: Zxcvbn-PHP
Installation
composer require locastic/zxcvbn-password-validator
Options
You can use the Locastic\Component\ZxcvbnPasswordValidator\Validator\Constraints\ZxcvbnPasswordValidator
constraint with the following options.
| Option | Type | Description |
|---|---|---|
| message | string |
The validation message (default: password_too_weak) |
| minEntropy | float |
Desired minimal entropy value (password strength |
Annotations
If you are using annotations for validation, include the constraints namespace:
use Locastic\Component\ZxcvbnPasswordValidator\Validator\Constraints as LocasticPassword;
and then add the ZxcvbnPasswordValidator constraint to the relevant field:
/** * @LocasticPassword\ZxcvbnPasswordValidator(minEntropy=50) */ protected $password;
YAML
App\Entity\User: properties: password: - Locastic\Component\ZxcvbnPasswordValidator\Validator\Constraints\ZxcvbnPasswordValidator: minEntropy: 50
Support
Need help at your project? Write us an email on info@locastic.com
locastic/zxcvbn-password-validator 适用场景与选型建议
locastic/zxcvbn-password-validator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.52k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 07 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「php」 「validator」 「password」 「dropbox」 「zxcvb」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 locastic/zxcvbn-password-validator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 locastic/zxcvbn-password-validator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 locastic/zxcvbn-password-validator 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Runn Me! Validation and Sanitization Library
Extension for Opis JSON Schema
The bundle for easy using json-rpc api on your project
Bundle Symfony DaplosBundle
Laravel credit card validator 2 from rap2hpoutre
Some pre-defined rules for validation in Omnipay payment processing library.
统计信息
- 总下载量: 1.52k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-07-18