Package Data | |
---|---|
Maintainer Username: | bitbeans |
Maintainer Contact: | c.hermann@bitbeans.de (Christian Hermann) |
Package Create Date: | 2015-10-12 |
Package Last Update: | 2015-10-22 |
Home Page: | https://knownpasswords.org |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-21 03:00:10 |
Package Statistics | |
---|---|
Total Downloads: | 6 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 4 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
KnownPasswords for Laravel 5
Requires:
Add bitbeans/knownpasswords
to composer.json
.
"bitbeans/knownpasswords": "dev-master"
Run composer update
to pull down the latest version of KnownPasswords.
Now open up PROJECTFOLDER/config/app.php
and add the service provider to your providers
array.
'providers' => array(
'Bitbeans\KnownPasswords\KnownPasswordsServiceProvider',
)
And also the alias.
'aliases' => array(
'KnownPasswords' => 'Bitbeans\KnownPasswords\KnownPasswordsFacade',
)
Run php artisan vendor:publish
and modify the config file (PROJECTFOLDER/config/knownpasswords.php) with your own information.
<?php namespace App\Services\Validation;
use KnownPasswords;
class MyValidation {
public function validateKnownPassword($attribute, $value, $parameters) {
try {
return KnownPasswords::checkPassword($value);
}
catch (\Exception $e)
{
return false;
}
return false;
}
}
KnownPasswords can validate the following password formats:
Never store passwords in these formats, always us a KDF (key derivation function)!