vakata/authentication

PHP authentication library

3.5.4 2024-02-19 16:21 UTC

README

Latest Version on Packagist Software License Build Status Code Climate Tests Coverage

PHP authentication.

Install

Via Composer

$ composer require vakata/authentication

Usage

$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

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email github@vakata.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.