Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
},
"require": {
"php": "~8.2.0 || ~8.3.0",
"ext-json": "*",
"ext-gd": "*",
"ext-json": "*",
"dotkernel/dot-annotated-services": "^4.1.7",
"dotkernel/dot-cache": "^4.0",
"dotkernel/dot-cli": "^3.5.0",
Expand Down Expand Up @@ -78,7 +78,8 @@
"mezzio/mezzio-twigrenderer": "^2.15.0",
"ramsey/uuid-doctrine": "^2.0.0",
"roave/psr-container-doctrine": "^4.1.0",
"symfony/filesystem": "^7.0.3"
"symfony/filesystem": "^7.0.3",
"symfony/var-exporter": "^6.4 || ^7.4"
},
"require-dev": {
"laminas/laminas-coding-standard": "^2.5",
Expand Down
3 changes: 1 addition & 2 deletions src/App/src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Api\App\Command\RouteListCommand;
use Api\App\Command\TokenGenerateCommand;
use Api\App\Entity\EntityListenerResolver;
use Api\App\Factory\AuthenticationMiddlewareFactory;
use Api\App\Factory\EntityListenerResolverFactory;
use Api\App\Factory\RouteListCommandFactory;
use Api\App\Factory\TokenGenerateCommandFactory;
Expand Down Expand Up @@ -63,7 +62,7 @@
'doctrine.entity_manager.orm_default' => EntityManagerFactory::class,
'dot-mail.options.default' => MailOptionsAbstractFactory::class,
'dot-mail.service.default' => MailServiceAbstractFactory::class,
AuthenticationMiddleware::class => AuthenticationMiddlewareFactory::class,
AuthenticationMiddleware::class => AnnotatedServiceFactory::class,

Check warning on line 65 in src/App/src/ConfigProvider.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'AnnotatedServiceFactory'
AuthorizationMiddleware::class => AnnotatedServiceFactory::class,
ContentNegotiationMiddleware::class => AnnotatedServiceFactory::class,
Environment::class => TwigEnvironmentFactory::class,
Expand Down
15 changes: 14 additions & 1 deletion src/App/src/Middleware/AuthenticationMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@

use Api\App\UserIdentity;
use Api\User\Entity\UserRole;
use Dot\AnnotatedServices\Annotation\Inject;

Check warning on line 9 in src/App/src/Middleware/AuthenticationMiddleware.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'Inject'

Check warning on line 9 in src/App/src/Middleware/AuthenticationMiddleware.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined namespace

Undefined namespace 'Annotation'
use Mezzio\Authentication\AuthenticationInterface;

Check warning on line 10 in src/App/src/Middleware/AuthenticationMiddleware.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'AuthenticationInterface'
use Mezzio\Authentication\UserInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;

Check warning on line 14 in src/App/src/Middleware/AuthenticationMiddleware.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'MiddlewareInterface'
use Psr\Http\Server\RequestHandlerInterface;

Check warning on line 15 in src/App/src/Middleware/AuthenticationMiddleware.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined namespace

Undefined namespace 'Server'

class AuthenticationMiddleware extends \Mezzio\Authentication\AuthenticationMiddleware
class AuthenticationMiddleware implements MiddlewareInterface

Check warning on line 17 in src/App/src/Middleware/AuthenticationMiddleware.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'MiddlewareInterface'
{
/**
* @Inject({
* AuthenticationInterface::class,
* })
*/
public function __construct(
protected AuthenticationInterface $auth,

Check warning on line 25 in src/App/src/Middleware/AuthenticationMiddleware.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'AuthenticationInterface'
) {
}

public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$user = $this->auth->authenticate($request);
Expand Down
Loading