tmd/laravel-password-updater
laravel-password-updater
Handles password verification and re-hashing passwords that may be hashed by outdated methods.
Setup
composer require tmd/laravel-password-updater
Usage
(Overly simplified example.)
<?php
use Tmd\LaravelPasswordUpdater\PasswordHasher;
public function login(PasswordHasher $passwordHasher)
{
/** @var User $user */
$user = User::where('username', $credentials['username'])->first();
if (!$user) {
return ['username' => ['There is no account with that username.']];
}
if (!$passwordHasher->verify($credentials['password'], $user, 'password')) {
return ['password' => ['That password is not correct.']];
}
// Password is correct.
}
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
644,549,754
9,698
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
423,477,751
607
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
403,217,078
4,664
Version History
| Version | Released | License |
|---|---|---|
| 0.0.2 | MIT | |
| 0.0.1 | MIT |