recon/application/vendor/auth0/auth0-php/tests/unit/Helpers/MockJwks.php
2023-02-27 18:53:14 +05:30

32 lines
659 B
PHP

<?php
namespace Auth0\Tests\unit\Helpers;
use Auth0\SDK\Helpers\JWKFetcher;
use Auth0\Tests\unit\MockApi;
use Psr\SimpleCache\CacheInterface;
/**
* Class MockJwks
*
* @package Auth0\SDK\Helpers\JWKFetcher
*/
class MockJwks extends MockApi
{
/**
* @var JWKFetcher
*/
protected $client;
/**
* @param array $guzzleOptions
* @param array $config
*/
public function setClient(array $guzzleOptions, array $config = [])
{
$cache = isset( $config['cache'] ) && $config['cache'] instanceof CacheInterface ? $config['cache'] : null;
$this->client = new JWKFetcher( $cache, $guzzleOptions );
}
}