1 | <?php |
||
20 | final class RotatableJWK implements JWKInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var \Jose\Object\JWKInterface |
||
24 | */ |
||
25 | private $jwk; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $filename; |
||
31 | |||
32 | /** |
||
33 | * @var int |
||
34 | */ |
||
35 | private $ttl; |
||
36 | |||
37 | /** |
||
38 | * @var int|null |
||
39 | */ |
||
40 | private $expires_at = 0; |
||
41 | |||
42 | /** |
||
43 | * @var array |
||
44 | */ |
||
45 | private $parameters; |
||
46 | |||
47 | /** |
||
48 | * RotatableJWK constructor. |
||
49 | * |
||
50 | * @param string $filename |
||
51 | * @param array $parameters |
||
52 | * @param int $ttl |
||
53 | */ |
||
54 | public function __construct($filename, array $parameters, $ttl = 0) |
||
64 | |||
65 | /** |
||
66 | * @return \Jose\Object\JWKInterface |
||
67 | */ |
||
68 | private function getJWK() |
||
79 | |||
80 | private function loadJWK() |
||
99 | |||
100 | private function createJWK() |
||
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | public function getAll() |
||
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | */ |
||
126 | public function get($key) |
||
130 | |||
131 | /** |
||
132 | * {@inheritdoc} |
||
133 | */ |
||
134 | public function has($key) |
||
138 | |||
139 | /** |
||
140 | * {@inheritdoc} |
||
141 | */ |
||
142 | public function thumbprint($hash_algorithm) |
||
146 | |||
147 | /** |
||
148 | * {@inheritdoc} |
||
149 | */ |
||
150 | public function toPublic() |
||
154 | |||
155 | /** |
||
156 | * {@inheritdoc} |
||
157 | */ |
||
158 | public function jsonSerialize() |
||
162 | } |
||
163 |