PHP authentication.
Via Composer
$ composer require vakata/authentication
$auth = new \vakata\authentication\PasswordDatabase($db);
try {
$token = $auth->authenticate([
'username' => $req->getPost('username'),
'password' => $req->getPost('password')
]);
} catch (AuthenticationException $e) {
// process exception
}
// work with $token
Read more in the API docs
$ composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email github@vakata.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.