1 | <?php |
||
20 | abstract class DownloadedJWKSet extends BaseJWKSet implements JWKSetInterface |
||
21 | { |
||
22 | use JWKSetPEM; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $url; |
||
28 | |||
29 | /** |
||
30 | * @var null|\Psr\Cache\CacheItemPoolInterface |
||
31 | */ |
||
32 | private $cache; |
||
33 | |||
34 | /** |
||
35 | * @var int |
||
36 | */ |
||
37 | private $ttl; |
||
38 | |||
39 | /** |
||
40 | * @var bool |
||
41 | */ |
||
42 | private $allow_unsecured_connection; |
||
43 | |||
44 | /** |
||
45 | * DownloadedJWKSet constructor. |
||
46 | * |
||
47 | * @param string $url |
||
48 | * @param \Psr\Cache\CacheItemPoolInterface|null $cache |
||
49 | * @param int $ttl |
||
50 | * @param bool $allow_unsecured_connection |
||
51 | * @param bool $allow_http_connection |
||
52 | */ |
||
53 | public function __construct($url, CacheItemPoolInterface $cache = null, $ttl = 86400, $allow_unsecured_connection = false, $allow_http_connection = false) |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function addKey(JWKInterface $key) |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | public function prependKey(JWKInterface $key) |
||
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | public function removeKey($index) |
||
95 | |||
96 | /** |
||
97 | * @return string |
||
98 | */ |
||
99 | protected function getContent() |
||
120 | |||
121 | /** |
||
122 | * @throws \InvalidArgumentException |
||
123 | * |
||
124 | * @return string |
||
125 | */ |
||
126 | private function downloadContent() |
||
146 | } |
||
147 |