stickee / zend-expressive-auth
此包已被废弃且不再维护。未建议替代包。
通过 Google 进行身份验证
0.1.1
2017-08-21 15:53 UTC
Requires
- damess/expressive-session-middleware: ^1.0
- dflydev/fig-cookies: ^1.0
- firebase/php-jwt: ^5.0
- league/oauth2-client: ^2.0
- zendframework/zend-diactoros: ^1.4@dev
- zendframework/zend-expressive-helpers: ^4.0@dev
Requires (Dev)
- php: ^7.1
- friendsofphp/php-cs-fixer: ~1
- fzaninotto/faker: ^1.6
- jakub-onderka/php-parallel-lint: ^0.9.2
- mockery/mockery: ^0.9.9
- nikic/php-parser: ^3.1
- phpmd/phpmd: ^2.6
- phpro/grumphp: ^0.11.6
- phpstan/phpstan: ^0.8.0
- phpunit/phpunit: ^6.0.8 || ^5.7.15
- povils/phpmnd: ^1.1
- sebastian/phpcpd: ^3.0
- sensiolabs/security-checker: ^4.0
- squizlabs/php_codesniffer: ^2.8.1
This package is not auto-updated.
Last update: 2022-08-20 16:47:21 UTC
README
用于登录到声明性应用的认证
这需要你将 \Stickee\Auth\ConfigProvider
添加到你的主配置中。
目前,此设计用于保护单个路由。
为此,你只需要将中间件添加到该路由的链中
<?php use Stickee\Auth\Authentication\Middleware as AuthenticationMiddleware; $app->post( '/', [ AuthenticationMiddleware::class, ProtectedAction::class, ], 'protected' );
但确保不要将其添加到将你重定向出去的路由中!
<?php use \Stickee\Auth\Oauth\RedirectAction; $app->get('/login/redirect', RedirectAction::class, 'oauth-redirect');