diff --git a/README.md b/README.md index 4fb3e81f..1de02ef9 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,15 @@ Dotkernel API is an alternative for legacy Laminas API Tools (formerly Apigility Documentation is available at: https://docs.dotkernel.org/api-documentation/ +## Version History + +| Branch | Release | PSR-11 | OSS Lifecycle | PHP Version | +|--------|----------|--------|--------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------| +| 6.0 | `>= 6.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fapi%2Fblob%2F6.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/6.1.0) | +| 5.0 | `< 6.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fapi%2Fblob%2F5.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/5.3.0) | +| 4.0 | `< 5.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fapi%2Fblob%2F4.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/4.5.0) | +| 3.0 | `< 4.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fapi%2Fblob%2F3.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/3.0.4) | + ## Badges ![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/api) diff --git a/SECURITY.md b/SECURITY.md index e72f271e..c6b74c39 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,13 +2,12 @@ ## Supported Versions -| Version | Supported | -|---------|-------------------------------| -| 6.x | :white_check_mark: | -| 5.x | :white_check_mark: | -| 4.x | :warning: (security-fix only) | -| 3.x | :x: | -| <= 2.0 | :x: | +| Version | Supported | PHP Version | +|---------|--------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------| +| 6.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fapi%2Fblob%2F6.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/6.1.0) | +| 5.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fapi%2Fblob%2F5.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/5.3.0) | +| 4.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fapi%2Fblob%2F4.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/4.5.0) | +| 3.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fapi%2Fblob%2F3.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/3.0.4) | ## Reporting Potential Security Issues diff --git a/src/App/src/Middleware/AuthenticationMiddleware.php b/src/App/src/Middleware/AuthenticationMiddleware.php index 25ac3c81..9ef03df3 100644 --- a/src/App/src/Middleware/AuthenticationMiddleware.php +++ b/src/App/src/Middleware/AuthenticationMiddleware.php @@ -6,13 +6,20 @@ use Api\App\UserIdentity; use Api\User\Entity\UserRole; +use Mezzio\Authentication\AuthenticationInterface; use Mezzio\Authentication\UserInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; +use Psr\Http\Server\MiddlewareInterface; use Psr\Http\Server\RequestHandlerInterface; -class AuthenticationMiddleware extends \Mezzio\Authentication\AuthenticationMiddleware +class AuthenticationMiddleware implements MiddlewareInterface { + public function __construct( + protected AuthenticationInterface $auth, + ) { + } + public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $user = $this->auth->authenticate($request);