humble/auth

dev-master 2016-10-17 16:29 UTC

This package is not auto-updated.

Last update: 2024-05-11 17:10:22 UTC


README

Latest Version Software License Build Status

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.