humble/auth

HUMBLE Auth

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

This package is not auto-updated.

Last update: 2024-09-14 19:09:22 UTC


README

Latest Version Software License Build Status

HUMBLE Auth

安装

通过 Composer

$ composer require humble/auth

用法

使用 PDO 适配器获取 PHP 身份验证。

$adapter = new \Humble\Auth\PdoAdapter($pdo);
$auth = new \Humble\Auth\Auth($adapter, $session);

验证凭证。

$auth->authenticate([
    'username' => 'tester@test.com',
    'password' => 'secret'
]);

获取已验证用户数据。

$auth->get();

删除已验证用户。

$auth->logout();

许可协议

MIT 许可协议 (MIT)。有关更多信息,请参阅许可文件