Download the PHP package rebelinblue/laravel5-zxcvbn without Composer
On this page you can find all versions of the php package rebelinblue/laravel5-zxcvbn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rebelinblue/laravel5-zxcvbn
More information about rebelinblue/laravel5-zxcvbn
Files in rebelinblue/laravel5-zxcvbn
Package laravel5-zxcvbn
Short Description Service provider to use the zxcvbn project by @dropbox in Laravel 5.4 and above
License MIT
Homepage https://github.com/REBELinBLUE/laravel-zxcvbn
Informations about the package laravel5-zxcvbn
Laravel Zxcvbn validator
This package provides a validator which uses Dropbox's zxcvbn password strength estimator; it uses the PHP implementation from bjeavons.
Installation
This package can be installed through Composer.
In Laravel 5.5 the package will auto-register the service provider. In Laravel 5.4 you must register this
service provider manually in config/app.php
by adding REBELinBLUE\Zxcvbn\ZxcvbnServiceProvider::class
to the
providers
array
There is also an optional facade for Zxcvbn; in Laravel 5.5 it will be auto-registered. In Laravel 5.4
you must register the facade manually by adding the following to the aliases
array in config/app.php
Optionally, you can publish the translations for this package with, however it is only required if you wish to change them
Usage
If you have added the alias you can access Zxcvbn from anywhere in your code using the façade
However, you probably want to use it as a validator. The package add a single rule "zxcvbn"
Example
There are 2 optional parameters, the required score from 0 to 4 and a comma separate list of other fields to compare against, for example to ensure a strong password which doesn't contain the username or email you would use
The scores are rated as follows:
- 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)
All versions of laravel5-zxcvbn with dependencies
illuminate/support Version ^5.4||^6.0||^7.0||^8.0||^9.0||^10.0
bjeavons/zxcvbn-php Version ^0.3||^1.2||^1.3