refactor: migrate to scoped execution contexts

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-07-27 00:50:43 -04:00
parent eb78c5149a
commit 26ee6e9c33
2 changed files with 16 additions and 16 deletions
+6 -6
View File
@@ -13,8 +13,8 @@ use InvalidArgumentException;
use KTXC\Http\Response\JsonResponse;
use KTXC\Http\Response\Response;
use KTXC\Http\Response\StreamedNdJsonResponse;
use KTXC\SessionIdentity;
use KTXC\SessionTenant;
use KTXC\Context\IdentityContextInterface;
use KTXC\Context\TenantContextInterface;
use KTXF\Controller\ControllerAbstract;
use KTXF\Json\JsonSerializable;
use KTXF\Resource\Identifier\CollectionIdentifier;
@@ -51,8 +51,8 @@ class DefaultController extends ControllerAbstract {
private const ERR_TARGET_ENTITY = 'Invalid parameter: target must be provider:service:collection:entity';
public function __construct(
private readonly SessionTenant $tenantIdentity,
private readonly SessionIdentity $userIdentity,
private readonly TenantContextInterface $tenantContext,
private readonly IdentityContextInterface $identityContext,
private readonly Manager $manager,
private readonly LoggerInterface $logger
) {}
@@ -80,8 +80,8 @@ class DefaultController extends ControllerAbstract {
): Response {
// authorize request
$tenantId = $this->tenantIdentity->identifier();
$userId = $this->userIdentity->identifier();
$tenantId = $this->tenantContext->identifier();
$userId = $this->identityContext->identifier();
try {