1 | <?php |
||
18 | class ConfigurationHelper |
||
19 | { |
||
20 | const BUNDLE_ALIAS = 'jose'; |
||
21 | |||
22 | /** |
||
23 | * @param ContainerBuilder $container |
||
24 | * @param string $name |
||
25 | * @param string[] $signatureAlgorithms |
||
26 | * @param bool $is_public |
||
27 | * @param array $tags |
||
28 | */ |
||
29 | public static function addJWSBuilder(ContainerBuilder $container, string $name, array $signatureAlgorithms, bool $is_public = true, array $tags = []) |
||
46 | |||
47 | /** |
||
48 | * @param ContainerBuilder $container |
||
49 | * @param string $name |
||
50 | * @param string[] $signatureAlgorithms |
||
51 | * @param bool $is_public |
||
52 | * @param array $tags |
||
53 | */ |
||
54 | public static function addJWSVerifier(ContainerBuilder $container, string $name, array $signatureAlgorithms, bool $is_public = true, array $tags = []) |
||
72 | |||
73 | /** |
||
74 | * @param ContainerBuilder $container |
||
75 | * @param string $name |
||
76 | * @param string[] $serializers |
||
77 | * @param bool $is_public |
||
78 | * @param array $tags |
||
79 | */ |
||
80 | public static function addJWSSerializer(ContainerBuilder $container, string $name, array $serializers, bool $is_public = true, array $tags = []) |
||
98 | |||
99 | /** |
||
100 | * @param ContainerBuilder $container |
||
101 | * @param string $name |
||
102 | * @param string[] $serializers |
||
103 | * @param string[] $signature_algorithms |
||
104 | * @param string[] $header_checkers |
||
105 | * @param bool $is_public |
||
106 | * @param array $tags |
||
107 | */ |
||
108 | public static function addJWSLoader(ContainerBuilder $container, string $name, array $serializers, array $signature_algorithms, array $header_checkers, bool $is_public = true, array $tags = []) |
||
128 | |||
129 | /** |
||
130 | * @param ContainerBuilder $container |
||
131 | * @param string $name |
||
132 | * @param string[] $jwe_serializers |
||
133 | * @param string[] $key_encryption_algorithms |
||
134 | * @param string[] $content_encryption_algorithms |
||
135 | * @param string[] $compression_methods |
||
136 | * @param string[] $jwe_header_checkers |
||
137 | * @param string[] $jws_serializers |
||
138 | * @param string[] $signature_algorithms |
||
139 | * @param string[] $jws_header_checkers |
||
140 | * @param bool $is_public |
||
141 | * @param array $tags |
||
142 | */ |
||
143 | public static function addNestedTokenLoader(ContainerBuilder $container, string $name, array $jwe_serializers, array $key_encryption_algorithms, array $content_encryption_algorithms, array $compression_methods, array $jwe_header_checkers, array $jws_serializers, array $signature_algorithms, array $jws_header_checkers, bool $is_public = true, array $tags = []) |
||
168 | |||
169 | /** |
||
170 | * @param ContainerBuilder $container |
||
171 | * @param string $name |
||
172 | * @param string[] $jwe_serializers |
||
173 | * @param string[] $key_encryption_algorithms |
||
174 | * @param string[] $content_encryption_algorithms |
||
175 | * @param string[] $compression_methods |
||
176 | * @param string[] $jws_serializers |
||
177 | * @param string[] $signature_algorithms |
||
178 | * @param bool $is_public |
||
179 | * @param array $tags |
||
180 | */ |
||
181 | public static function addNestedTokenBuilder(ContainerBuilder $container, string $name, array $jwe_serializers, array $key_encryption_algorithms, array $content_encryption_algorithms, array $compression_methods, array $jws_serializers, array $signature_algorithms, bool $is_public = true, array $tags = []) |
||
204 | |||
205 | /** |
||
206 | * @param ContainerBuilder $container |
||
207 | * @param string $name |
||
208 | * @param string[] $serializers |
||
209 | * @param bool $is_public |
||
210 | * @param array $tags |
||
211 | */ |
||
212 | public static function addJWESerializer(ContainerBuilder $container, string $name, array $serializers, bool $is_public = true, array $tags = []) |
||
230 | |||
231 | /** |
||
232 | * @param ContainerBuilder $container |
||
233 | * @param string $name |
||
234 | * @param string[] $serializers |
||
235 | * @param string[] $key_encryption_algorithms |
||
236 | * @param string[] $content_encryption_algorithms |
||
237 | * @param string[] $compression_methods |
||
238 | * @param string[] $header_checkers |
||
239 | * @param bool $is_public |
||
240 | * @param array $tags |
||
241 | */ |
||
242 | public static function addJWELoader(ContainerBuilder $container, string $name, array $serializers, array $key_encryption_algorithms, array $content_encryption_algorithms, array $compression_methods, array $header_checkers, bool $is_public = true, array $tags = []) |
||
264 | |||
265 | /** |
||
266 | * @param ContainerBuilder $container |
||
267 | * @param string $name |
||
268 | * @param string[] $claimCheckers |
||
269 | * @param bool $is_public |
||
270 | * @param array $tags |
||
271 | */ |
||
272 | public static function addClaimChecker(ContainerBuilder $container, string $name, array $claimCheckers, bool $is_public = true, array $tags = []) |
||
290 | |||
291 | /** |
||
292 | * @param ContainerBuilder $container |
||
293 | * @param string $name |
||
294 | * @param string[] $headerCheckers |
||
295 | * @param bool $is_public |
||
296 | * @param array $tags |
||
297 | */ |
||
298 | public static function addHeaderChecker(ContainerBuilder $container, string $name, array $headerCheckers, bool $is_public = true, array $tags = []) |
||
316 | |||
317 | /** |
||
318 | * @param ContainerBuilder $container |
||
319 | * @param string $name |
||
320 | * @param string $type |
||
321 | * @param array $parameters |
||
322 | * @param bool $is_public |
||
323 | * @param array $tags |
||
324 | */ |
||
325 | public static function addKey(ContainerBuilder $container, string $name, string $type, array $parameters, bool $is_public = true, array $tags = []) |
||
341 | |||
342 | /** |
||
343 | * @param ContainerBuilder $container |
||
344 | * @param string $name |
||
345 | * @param string $type |
||
346 | * @param array $parameters |
||
347 | * @param bool $is_public |
||
348 | * @param array $tags |
||
349 | */ |
||
350 | public static function addKeyset(ContainerBuilder $container, string $name, string $type, array $parameters, bool $is_public = true, array $tags = []) |
||
366 | |||
367 | /** |
||
368 | * @param ContainerBuilder $container |
||
369 | * @param string $name |
||
370 | * @param array $parameters |
||
371 | * @param bool $is_public |
||
372 | * @param array $tags |
||
373 | */ |
||
374 | public static function addKeyUri(ContainerBuilder $container, string $name, array $parameters, bool $is_public = true, array $tags = []) |
||
388 | |||
389 | /** |
||
390 | * @param ContainerBuilder $container |
||
391 | * @param string $name |
||
392 | * @param array $keyEncryptionAlgorithm |
||
393 | * @param array $contentEncryptionAlgorithms |
||
394 | * @param array $compressionMethods |
||
395 | * @param bool $is_public |
||
396 | * @param array $tags |
||
397 | */ |
||
398 | public static function addJWEBuilder(ContainerBuilder $container, string $name, array $keyEncryptionAlgorithm, array $contentEncryptionAlgorithms, array $compressionMethods = ['DEF'], bool $is_public = true, array $tags = []) |
||
418 | |||
419 | /** |
||
420 | * @param ContainerBuilder $container |
||
421 | * @param string $name |
||
422 | * @param array $keyEncryptionAlgorithm |
||
423 | * @param array $contentEncryptionAlgorithms |
||
424 | * @param array $compressionMethods |
||
425 | * @param bool $is_public |
||
426 | * @param array $tags |
||
427 | */ |
||
428 | public static function addJWEDecrypter(ContainerBuilder $container, string $name, array $keyEncryptionAlgorithm, array $contentEncryptionAlgorithms, array $compressionMethods = ['DEF'], bool $is_public = true, array $tags = []) |
||
448 | |||
449 | /** |
||
450 | * @param ContainerBuilder $container |
||
451 | * @param array $config |
||
452 | * @param string $element |
||
453 | */ |
||
454 | private static function updateJoseConfiguration(ContainerBuilder $container, array $config, string $element) |
||
463 | } |
||
464 |