<?php

declare(strict_types=1);

namespace Apexl\Io\User\Factories;

use Apexl\Io\User\Interfaces\JwtFromRequestServiceFactoryInterface;
use Apexl\Io\User\Services\JwtFromRequestService;
use DI\Container;
use Psr\Http\Message\ServerRequestInterface;

final readonly class JwtFromRequestServiceFactory implements JwtFromRequestServiceFactoryInterface
{
    public function __construct(private Container $container) {}

    public function make(ServerRequestInterface $request): JwtFromRequestService
    {
        return $this->container->make(JwtFromRequestService::class, [
            'request' => $request,
        ]);
    }

}
