2017 © Pedro Peláez
 

library password-strength-validator

Password strength validator for Symfony framework. Based on Dropbox's zxcvbn project.

image

gon-zoo82/password-strength-validator

Password strength validator for Symfony framework. Based on Dropbox's zxcvbn project.

  • Thursday, October 5, 2017
  • by GonZOO82
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,676 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 10 % Grown

The README.md

Password strength validator

Password strength constraint for Symfony validator component. Based on the zxcvbn project from Dropbox and @lowe, this is using zxcvbn-php under the hood for password strength estimation., (*1)

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., (*2)

Installation

The library can be installed with Composer by adding it as a dependency to your composer.json file., (*3)

$ composer require "mdarse/password-strength-validator"

Usage

use Darse\PasswordStrengthValidator\Constraint\PasswordStrength;

class User
{
    /**
     * @PasswordStrength(min_score=3, message="Custom message for weak password error")
     */
    private $password;
}

You may simply use the simpler @PasswordStrength(3) form for a minimum password score of 3, if you don't need a custom message.
More information on validation with Symfony validator can be found in the documentation., (*4)

Score

The score is an integer from 0-4 (you can mentally represent it as a strength bar) - 0 too guessable: risky password. (guesses < 10^3) - 1 very guessable: protection from throttled online attacks. (guesses < 10^6) - 2 somewhat guessable: protection from unthrottled online attacks. (guesses < 10^8) - 3 safely unguessable: moderate protection from offline slow-hash scenario. (guesses < 10^10) - 4 very unguessable: strong protection from offline slow-hash scenario. (guesses >= 10^10), (*5)

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the complete license., (*6)

The Versions

05/10 2017

dev-master

9999999-dev

Password strength validator for Symfony framework. Based on Dropbox's zxcvbn project.

  Sources   Download

MPL-2.0

The Requires

 

The Development Requires

by Mathieu Darse