technobureau / mezzio-auth
基于 Doctrine 的 Mezzio 认证
dev-main
2022-01-18 18:04 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
- technobureau/mezzio-pdo-oauth: dev-main
This package is auto-updated.
Last update: 2024-09-18 23:51:46 UTC
README
它使用基于 Doctrine ORM 的 mezzio 认证。对于迁移或使用 doctrine orm 创建表
-
在 routes.php 中添加以下条目以注册认证路由
(new TechnoBureau\mezzioAuth\ConfigProvider())->registerRoutes($app, '/user');
-
在 pipeline.php 中添加以下条目在 RouteMiddleware 之前,以全局注册所有路由的中间件。
$app->pipe(SessionMiddleware::class); $app->pipe(FlashMessageMiddleware::class);
-
在 pipeline.php 中添加以下条目在 DispatchMiddleware 之前,以全局注册所有路由器的中间件。
$app->pipe(UserMiddleware::class);