attla / authentic

一个有效的无服务器用户身份验证层。

dev-main 2022-08-09 03:36 UTC

This package is auto-updated.

Last update: 2024-09-09 07:59:40 UTC


README

License Latest Stable Version Total Downloads

🆔 一个有效的无服务器用户身份验证层。

安装

composer require attla/authentic

配置

./config/auth.phpguards 中添加以下数组

'guards' => [
    // ...

    'authentic' => [
        'driver'   => 'authentic',
        'provider' => 'users',
    ],
],

此包需要与 eloquent provider driver 一起使用。

如果您想将 authentic 配置为默认的身份验证保护器,请将 defaults.guard 设置为

'defaults' => [
    'guard' => 'authentic',
    // ...
],

您的模型需要继承 Authenticatable,如下所示

class Example extends Authenticatable
{
    // ...
}

许可

此包在 MIT 许可证 下发布 © Octha