1 | <?php |
||
20 | abstract class DownloadedJWKSet implements JWKSetInterface |
||
21 | { |
||
22 | use BaseJWKSet; |
||
23 | use JWKSetPEM; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $url; |
||
29 | |||
30 | /** |
||
31 | * @var null|\Psr\Cache\CacheItemPoolInterface |
||
32 | */ |
||
33 | private $cache; |
||
34 | |||
35 | /** |
||
36 | * @var int |
||
37 | */ |
||
38 | private $ttl; |
||
39 | |||
40 | /** |
||
41 | * @var bool |
||
42 | */ |
||
43 | private $allow_unsecured_connection; |
||
44 | |||
45 | /** |
||
46 | * DownloadedJWKSet constructor. |
||
47 | * |
||
48 | * @param string $url |
||
49 | * @param \Psr\Cache\CacheItemPoolInterface|null $cache |
||
50 | * @param int $ttl |
||
51 | * @param bool $allow_unsecured_connection |
||
52 | * @param bool $allow_http_connection |
||
53 | */ |
||
54 | public function __construct($url, CacheItemPoolInterface $cache = null, $ttl = 86400, $allow_unsecured_connection = false, $allow_http_connection = false) |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public function addKey(JWKInterface $key) |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | public function removeKey($index) |
||
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | protected function getContent() |
||
113 | |||
114 | /** |
||
115 | * @throws \InvalidArgumentException |
||
116 | * |
||
117 | * @return string |
||
118 | */ |
||
119 | private function downloadContent() |
||
139 | } |
||
140 |