| Server IP : 104.21.84.107 / Your IP : 104.23.197.209 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/idiomas/libraries/vendor/web-token/jwt-library/NestedToken/ |
Upload File : |
<?php
declare(strict_types=1);
namespace Jose\Component\NestedToken;
use Jose\Component\Encryption\JWELoaderFactory;
use Jose\Component\Signature\JWSLoaderFactory;
class NestedTokenLoaderFactory
{
public function __construct(
private readonly JWELoaderFactory $jweLoaderFactory,
private readonly JWSLoaderFactory $jwsLoaderFactory
) {
}
/**
* This method creates a Nested Token Loader with the given encryption/signature algorithms, serializers,
* compression methods and header checkers.
*
* @param array<string> $jweSerializers
* @param array<string> $keyEncryptionAlgorithms
* @param array<string> $contentEncryptionAlgorithms
* @param null|array<string> $compressionMethods
* @param array<string> $jweHeaderCheckers
* @param array<string> $jwsSerializers
* @param array<string> $signatureAlgorithms
* @param array<string> $jwsHeaderCheckers
*/
public function create(
array $jweSerializers,
array $keyEncryptionAlgorithms,
null|array $contentEncryptionAlgorithms,
null|array $compressionMethods,
array $jweHeaderCheckers,
array $jwsSerializers,
array $signatureAlgorithms,
array $jwsHeaderCheckers
): NestedTokenLoader {
$jweLoader = $this->jweLoaderFactory->create(
$jweSerializers,
$keyEncryptionAlgorithms,
$contentEncryptionAlgorithms,
$compressionMethods,
$jweHeaderCheckers
);
$jwsLoader = $this->jwsLoaderFactory->create($jwsSerializers, $signatureAlgorithms, $jwsHeaderCheckers);
return new NestedTokenLoader($jweLoader, $jwsLoader);
}
}