tri-le/zf-authentication

此包已被废弃,不再维护。作者建议使用 https://github.com/Tri-Le/laminas-authentication 包。
此包的最新版本(v1.1.0)没有提供许可证信息。

laminas应用的认证模块

v1.1.0 2023-10-27 16:11 UTC

This package is auto-updated.

Last update: 2023-10-27 16:16:32 UTC


README

此模块仅与Laminas应用兼容

配置

您必须首先创建数据库并定义Laminas db 配置。例如:mysqli,sqlite,...

'db' => [
        'driver' => 'Pdo_Sqlite',
        'database' => realpath(__DIR__ . '/../../data/db/my_db')
    ]

开始前

运行 bin/create-user-table 以初始化相关内容。您将需要创建第一个用户。

开始

通过浏览器访问 /login 以测试结果。您可以使用上一步创建的用户进行登录。

注意

密码以 sha256 哈希值存储。

要覆盖视图脚本,请使用配置

'layout/login' => __DIR__ . '/../view/layout/login.phtml',
'tri-le/authentication/log-in/index' => __DIR__ . '/../view/log-in/index.phtml',
'tri-le/authentication/success/index' => __DIR__ . '/../view/success/index.phtml'

谢谢