humble / auth
HUMBLE Auth
dev-master
2016-10-17 16:29 UTC
Requires
- php: >=7.0.0
- humble/standards: ~1.0
Requires (Dev)
- phpunit/phpunit: ~5.2
This package is not auto-updated.
Last update: 2025-01-04 20:31:15 UTC
README
HUMBLE Auth
Install
Via Composer
$ composer require humble/auth
Usage
Get PHP Auth with Pdo Adapter.
$adapter = new \Humble\Auth\PdoAdapter($pdo);
$auth = new \Humble\Auth\Auth($adapter, $session);
Authenticate credentials.
$auth->authenticate([
'username' => 'tester@test.com',
'password' => 'secret'
]);
Get authenticated user data.
$auth->get();
Remove authenticated user.
$auth->logout();
License
The MIT License (MIT). Please see License File for more information.