1 | <?php |
||
21 | final class ConfigurationHelper |
||
22 | { |
||
23 | const BUNDLE_ALIAS = 'jose'; |
||
24 | |||
25 | /** |
||
26 | * @param ContainerBuilder $container |
||
27 | * @param string $name |
||
28 | * @param string[] $signatureAlgorithms |
||
29 | * @param bool $is_public |
||
30 | * @param array $tags |
||
31 | */ |
||
32 | public static function addJWSBuilder(ContainerBuilder $container, string $name, array $signatureAlgorithms, bool $is_public = true, array $tags = []) |
||
49 | |||
50 | /** |
||
51 | * @param ContainerBuilder $container |
||
52 | * @param string $name |
||
53 | * @param string[] $signatureAlgorithms |
||
54 | * @param bool $is_public |
||
55 | * @param array $tags |
||
56 | */ |
||
57 | public static function addJWSVerifier(ContainerBuilder $container, string $name, array $signatureAlgorithms, bool $is_public = true, array $tags = []) |
||
75 | |||
76 | /** |
||
77 | * @param ContainerBuilder $container |
||
78 | * @param string $name |
||
79 | * @param string[] $serializers |
||
80 | * @param bool $is_public |
||
81 | * @param array $tags |
||
82 | */ |
||
83 | public static function addJWSSerializer(ContainerBuilder $container, string $name, array $serializers, bool $is_public = true, array $tags = []) |
||
101 | |||
102 | /** |
||
103 | * @param ContainerBuilder $container |
||
104 | * @param string $name |
||
105 | * @param string[] $serializers |
||
106 | * @param string[] $signature_algorithms |
||
107 | * @param string[] $header_checkers |
||
108 | * @param bool $is_public |
||
109 | * @param array $tags |
||
110 | */ |
||
111 | public static function addJWSLoader(ContainerBuilder $container, string $name, array $serializers, array $signature_algorithms, array $header_checkers, bool $is_public = true, array $tags = []) |
||
131 | |||
132 | /** |
||
133 | * @param ContainerBuilder $container |
||
134 | * @param string $name |
||
135 | * @param string[] $serializers |
||
136 | * @param bool $is_public |
||
137 | * @param array $tags |
||
138 | */ |
||
139 | public static function addJWESerializer(ContainerBuilder $container, string $name, array $serializers, bool $is_public = true, array $tags = []) |
||
157 | |||
158 | /** |
||
159 | * @param ContainerBuilder $container |
||
160 | * @param string $name |
||
161 | * @param string[] $serializers |
||
162 | * @param string[] $key_encryption_algorithms |
||
163 | * @param string[] $content_encryption_algorithms |
||
164 | * @param string[] $compression_methods |
||
165 | * @param string[] $header_checkers |
||
166 | * @param bool $is_public |
||
167 | * @param array $tags |
||
168 | */ |
||
169 | 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 = []) |
||
191 | |||
192 | /** |
||
193 | * @param ContainerBuilder $container |
||
194 | * @param string $name |
||
195 | * @param string[] $claimCheckers |
||
196 | * @param bool $is_public |
||
197 | * @param array $tags |
||
198 | */ |
||
199 | public static function addClaimChecker(ContainerBuilder $container, string $name, array $claimCheckers, bool $is_public = true, array $tags = []) |
||
217 | |||
218 | /** |
||
219 | * @param ContainerBuilder $container |
||
220 | * @param string $name |
||
221 | * @param string[] $headerCheckers |
||
222 | * @param bool $is_public |
||
223 | * @param array $tags |
||
224 | */ |
||
225 | public static function addHeaderChecker(ContainerBuilder $container, string $name, array $headerCheckers, bool $is_public = true, array $tags = []) |
||
243 | |||
244 | /** |
||
245 | * @param ContainerBuilder $container |
||
246 | * @param string $name |
||
247 | * @param string $type |
||
248 | * @param array $parameters |
||
249 | * @param array $tags |
||
250 | */ |
||
251 | public static function addKey(ContainerBuilder $container, string $name, string $type, array $parameters, array $tags = []) |
||
266 | |||
267 | /** |
||
268 | * @param ContainerBuilder $container |
||
269 | * @param string $name |
||
270 | * @param string $type |
||
271 | * @param array $parameters |
||
272 | * @param array $tags |
||
273 | */ |
||
274 | public static function addKeyset(ContainerBuilder $container, string $name, string $type, array $parameters, array $tags = []) |
||
289 | |||
290 | /** |
||
291 | * @param ContainerBuilder $container |
||
292 | * @param string $name |
||
293 | * @param array $parameters |
||
294 | * @param array $tags |
||
295 | */ |
||
296 | public static function addKeyUri(ContainerBuilder $container, string $name, array $parameters, array $tags = []) |
||
309 | |||
310 | /** |
||
311 | * @param ContainerBuilder $container |
||
312 | * @param string $name |
||
313 | * @param array $keyEncryptionAlgorithm |
||
314 | * @param array $contentEncryptionAlgorithms |
||
315 | * @param array $compressionMethods |
||
316 | * @param bool $is_public |
||
317 | * @param array $tags |
||
318 | */ |
||
319 | public static function addJWEBuilder(ContainerBuilder $container, string $name, array $keyEncryptionAlgorithm, array $contentEncryptionAlgorithms, array $compressionMethods = ['DEF'], bool $is_public = true, array $tags = []) |
||
339 | |||
340 | /** |
||
341 | * @param ContainerBuilder $container |
||
342 | * @param string $name |
||
343 | * @param array $keyEncryptionAlgorithm |
||
344 | * @param array $contentEncryptionAlgorithms |
||
345 | * @param array $compressionMethods |
||
346 | * @param bool $is_public |
||
347 | * @param array $tags |
||
348 | */ |
||
349 | public static function addJWEDecrypter(ContainerBuilder $container, string $name, array $keyEncryptionAlgorithm, array $contentEncryptionAlgorithms, array $compressionMethods = ['DEF'], bool $is_public = true, array $tags = []) |
||
369 | |||
370 | /** |
||
371 | * @param ContainerBuilder $container |
||
372 | * @param array $config |
||
373 | * @param string $element |
||
374 | */ |
||
375 | private static function updateJoseConfiguration(ContainerBuilder $container, array $config, string $element) |
||
384 | } |
||
385 |