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 | */ |
||
31 | public static function addJWSBuilder(ContainerBuilder $container, string $name, array $signatureAlgorithms, bool $is_public = true) |
||
45 | |||
46 | /** |
||
47 | * @param ContainerBuilder $container |
||
48 | * @param string $name |
||
49 | * @param string[] $signatureAlgorithms |
||
50 | * @param string[] $headerCheckers |
||
51 | * @param bool $is_public |
||
52 | */ |
||
53 | public static function addJWSVerifier(ContainerBuilder $container, string $name, array $signatureAlgorithms, array $headerCheckers, bool $is_public = true) |
||
69 | |||
70 | /** |
||
71 | * @param ContainerBuilder $container |
||
72 | * @param string $name |
||
73 | * @param string[] $serializers |
||
74 | * @param bool $is_public |
||
75 | */ |
||
76 | public static function addJWSSerializer(ContainerBuilder $container, string $name, array $serializers, bool $is_public = true) |
||
91 | |||
92 | /** |
||
93 | * @param ContainerBuilder $container |
||
94 | * @param string $name |
||
95 | * @param string[] $serializers |
||
96 | * @param bool $is_public |
||
97 | */ |
||
98 | public static function addJWESerializer(ContainerBuilder $container, string $name, array $serializers, bool $is_public = true) |
||
113 | |||
114 | /** |
||
115 | * @param ContainerBuilder $container |
||
116 | * @param string $name |
||
117 | * @param string[] $claimCheckers |
||
118 | * @param bool $is_public |
||
119 | */ |
||
120 | public static function addClaimChecker(ContainerBuilder $container, string $name, array $claimCheckers, bool $is_public = true) |
||
135 | |||
136 | /** |
||
137 | * @param ContainerBuilder $container |
||
138 | * @param string $name |
||
139 | * @param string[] $headerCheckers |
||
140 | * @param bool $is_public |
||
141 | */ |
||
142 | public static function addHeaderChecker(ContainerBuilder $container, string $name, array $headerCheckers, bool $is_public = true) |
||
157 | |||
158 | /** |
||
159 | * @param ContainerBuilder $container |
||
160 | * @param string $name |
||
161 | * @param string $type |
||
162 | * @param array $parameters |
||
163 | */ |
||
164 | public static function addKey(ContainerBuilder $container, string $name, string $type, array $parameters) |
||
178 | |||
179 | /** |
||
180 | * @param ContainerBuilder $container |
||
181 | * @param string $name |
||
182 | * @param string $type |
||
183 | * @param array $parameters |
||
184 | */ |
||
185 | public static function addKeyset(ContainerBuilder $container, string $name, string $type, array $parameters) |
||
199 | |||
200 | /** |
||
201 | * @param ContainerBuilder $container |
||
202 | * @param string $name |
||
203 | * @param array $keyEncryptionAlgorithm |
||
204 | * @param array $contentEncryptionAlgorithms |
||
205 | * @param array $compressionMethods |
||
206 | * @param bool $is_public |
||
207 | */ |
||
208 | public static function addJWEBuilder(ContainerBuilder $container, string $name, array $keyEncryptionAlgorithm, array $contentEncryptionAlgorithms, array $compressionMethods = ['DEF'], bool $is_public = true) |
||
225 | |||
226 | /** |
||
227 | * @param ContainerBuilder $container |
||
228 | * @param string $name |
||
229 | * @param array $keyEncryptionAlgorithm |
||
230 | * @param array $contentEncryptionAlgorithms |
||
231 | * @param array $compressionMethods |
||
232 | * @param array $headerCheckers |
||
233 | * @param bool $is_public |
||
234 | */ |
||
235 | public static function addJWEDecrypter(ContainerBuilder $container, string $name, array $keyEncryptionAlgorithm, array $contentEncryptionAlgorithms, array $compressionMethods = ['DEF'], array $headerCheckers = [], bool $is_public = true) |
||
253 | |||
254 | /** |
||
255 | * @param ContainerBuilder $container |
||
256 | * @param array $config |
||
257 | * @param string $element |
||
258 | */ |
||
259 | private static function updateJoseConfiguration(ContainerBuilder $container, array $config, string $element) |
||
268 | } |
||
269 |