feat: remove legacy UserToken based auth

This commit is contained in:
2026-02-24 16:49:54 +01:00
parent 72bb2b8a61
commit 75a39058fe
16 changed files with 14 additions and 518 deletions
+4 -3
View File
@@ -7,8 +7,8 @@ use ApiPlatform\State\ProcessorInterface;
use App\ApiResource\Project\UpdateApiResource;
use App\Entity\Project\Update;
use App\Mapping\AutoMapper;
use App\Service\Auth\AuthService;
use App\State\EntityStateProcessor;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
class UpdateStateProcessor implements ProcessorInterface
@@ -16,7 +16,7 @@ class UpdateStateProcessor implements ProcessorInterface
public function __construct(
private EntityStateProcessor $entityStateProcessor,
private AutoMapper $autoMapper,
private AuthService $authService,
private Security $security,
) {}
/**
@@ -29,7 +29,8 @@ class UpdateStateProcessor implements ProcessorInterface
/** @var Update */
$update = $this->autoMapper->map($data, Update::class);
$user = $this->authService->getUser();
$user = $this->security->getUser();
if (!$user) {
throw new AuthenticationException();
}