codekandis / tiphy-authentication-integration
This library is an integration of `codekandis/authentication` into `codekandis/tiphy`.
0.11.1
2022-08-10 22:49 UTC
Requires
- php: ^7.4
- codekandis/authentication: ^0
- codekandis/converters: ^0
- codekandis/entities: ^0
- codekandis/persistence: ^0
- codekandis/tiphy: ^0
Requires (Dev)
- codekandis/phpunit: ^3
- roave/security-advisories: dev-master
README
This library is an integration of codekandis/authentication
into codekandis/tiphy
.
Index
Installation
Install the latest version with
$ composer require codekandis/tiphy-authentication-integration
How to use
Just inject the AuthorizationHeaderKeyAuthenticationPreDispatcher
into the ActionDispatcher
.
<?php declare( strict_types = 1 ); namespace Vendor\Project; use CodeKandis\Tiphy\Actions\ActionDispatcher; use CodeKandis\TiphyAuthenticationIntegration\Actions\PreDispatchment\Api\AuthorizationHeaderKeyAuthenticationPreDispatcher; $routesConfiguration = /** ... */; $throwableHandler = /** ... */; $usersRepository = /** ... */; $preDispatcher = new AuthorizationHeaderKeyAuthenticationPreDispatcher( $usersRepository ); $actionDispatcher = new ActionDispatcher( $routesConfiguration, $preDispatcher, $throwableHandler ); $actionDispatcher->dispatch();