Coder Social home page Coder Social logo

passwordstrengthvalidator's Introduction

RollerworksPasswordStrength Validator

This package provides various password strength validators for the Symfony Validator component.

To use this bundle with a Symfony application use the RollerworksPasswordStrengthBundle.

Passwords can be validated using either strength-levels (weak, medium, strong etc) or by configuring explicit requirements (needs letters, numbers etc).

This library provides the same level of functionality as the PasswordStrengthBundle created by John Bafford.

Installation

To install this package, add rollerworks/password-strength-validator to your composer.json:

$ php composer.phar require rollerworks/password-strength-validator

Now, Composer will automatically download all required files, and install them for you.

Requirements

You need at least PHP 5.6 or PHP 7.0, mbstring is recommended but not required. For the provided blacklist providers you may need SQLite3 or PDO compatible driver.

Basic Usage

Caution:

The password validators do not enforce that the field must have a value! To make a field "required" use the NotBlank constraint in combination with the password validator(s).

All examples assume you have the Composer autoloader already in your code, see also How to Install and Use the Symfony Components for more information.

Validates the passwords strength-level (weak, medium, strong etc).

Validates the passwords using explicitly configured requirements (letters, caseDiff, numbers, requireSpecialCharacter).

There are times you want forbid (blacklist) a password from usage.

Passwords are blacklisted using providers which can either be an array or (flat-file) database (which you can update regularly).

With the default installation the following providers can be used.

  • Noop: Default provider, does nothing.

  • Array: Simple in memory blacklist provider (not recommended for big lists)

  • Sqlite: Provides the blacklist using a SQLite3 database file.

  • Pdo: Provides the blacklist using the PDO extension.

But building your own is also possible. Documentation on this is currently missing, see current providers for more information.

Versioning

For transparency and insight into the release cycle, and for striving to maintain backward compatibility, this package is maintained under the Semantic Versioning guidelines as much as possible.

Releases will be numbered with the following format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

  • Breaking backward compatibility bumps the major (and resets the minor and patch)
  • New additions without breaking backward compatibility bumps the minor (and resets the patch)
  • Bug fixes and misc changes bumps the patch

For more information on SemVer, please visit http://semver.org/.

License

This library is released under the MIT license.

Contributing

This is an open source project. If you'd like to contribute, please read the Contributing Guidelines. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section.

passwordstrengthvalidator's People

Contributors

austinh avatar calvera avatar cordoval avatar eliotik avatar grahamcampbell avatar hlecorche avatar igormukhingmailcom avatar jacobmaster avatar liverbool avatar mennowame avatar mopster avatar philrennie avatar scrutinizer-auto-fixer avatar soullivaneuh avatar sstok avatar stof avatar yguedidi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.