| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Jose\Component\Signature; |
| 6 |
|
| 7 |
use Jose\Component\Core\AlgorithmManagerFactory; |
| 8 |
|
| 9 |
class JWSBuilderFactory |
| 10 |
{ |
| 11 |
public function __construct( |
| 12 |
private readonly AlgorithmManagerFactory $signatureAlgorithmManagerFactory |
| 13 |
) { |
| 14 |
} |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
public function create(array $algorithms): JWSBuilder |
| 22 |
{ |
| 23 |
$algorithmManager = $this->signatureAlgorithmManagerFactory->create($algorithms); |
| 24 |
|
| 25 |
return new JWSBuilder($algorithmManager); |
| 26 |
} |
| 27 |
} |