technobureau / mezzio-pdo-auth
Mezzio 的 PDO 基础认证
dev-main
2022-01-07 16:50 UTC
Requires
- php: ^7.3 || ~8.0.0 || ~8.1.0
- doctrine/orm: ^2.6
- laminas/laminas-form: ^3.1
- mezzio/mezzio-authentication-session: ^1.2
- mezzio/mezzio-authorization-acl: ^1.2
- mezzio/mezzio-csrf: ^1.3
- mezzio/mezzio-flash: ^1.3
- mezzio/mezzio-session-ext: ^1.12
- roave/psr-container-doctrine: ^3.1
Conflicts
- technobureau/mezzio-oauth2: dev-main
This package is auto-updated.
Last update: 2024-09-07 23:16:13 UTC
README
它使用基于 PDO 适配器的 mezzio 认证。对于迁移或使用 doctrine orm 创建表
-
在 routes.php 中添加以下条目以注册认证路由
(new TechnoBureau\mezzioPDOAuth\ConfigProvider())->registerRoutes($app, '/user');
-
在 pipeline.php 中添加以下条目在 RouteMiddleware 之前,以全局注册所有路由的中间件。
$app->pipe(SessionMiddleware::class); $app->pipe(FlashMessageMiddleware::class);
-
在 pipeline.php 中添加以下条目在 DispatchMiddleware 之前,以全局注册所有路由器的中间件。
$app->pipe(UserMiddleware::class);