![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/vendor/web-token/jwt-framework/src/Bundle/Services/ |
<?php declare(strict_types=1); namespace Jose\Bundle\JoseFramework\Services; use Jose\Bundle\JoseFramework\Event\NestedTokenLoadingFailureEvent; use Jose\Bundle\JoseFramework\Event\NestedTokenLoadingSuccessEvent; use Jose\Component\Core\JWKSet; use Jose\Component\Encryption\JWELoader; use Jose\Component\NestedToken\NestedTokenLoader as BaseNestedTokenLoader; use Jose\Component\Signature\JWS; use Jose\Component\Signature\JWSLoader; use Psr\EventDispatcher\EventDispatcherInterface; use Throwable; final class NestedTokenLoader extends BaseNestedTokenLoader { public function __construct( JWELoader $jweLoader, JWSLoader $jwsLoader, private readonly EventDispatcherInterface $eventDispatcher ) { parent::__construct($jweLoader, $jwsLoader); } public function load(string $token, JWKSet $encryptionKeySet, JWKSet $signatureKeySet, ?int &$signature = null): JWS { try { $jws = parent::load($token, $encryptionKeySet, $signatureKeySet, $signature); $this->eventDispatcher->dispatch(new NestedTokenLoadingSuccessEvent( $token, $jws, $signatureKeySet, $encryptionKeySet, $signature )); return $jws; } catch (Throwable $throwable) { $this->eventDispatcher->dispatch(new NestedTokenLoadingFailureEvent( $token, $signatureKeySet, $encryptionKeySet, $throwable )); throw $throwable; } } }