/**
  * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
  * @param string                                                  $service_name
  */
 private function updateJoseBundleConfigurationForJWTLoader(ContainerBuilder $container, $service_name)
 {
     $decrypter = sprintf('jose.decrypter.%s', $service_name);
     ConfigurationHelper::addJWTLoader($container, $service_name, sprintf('jose.verifier.%s', $service_name), sprintf('jose.checker.%s', $service_name), $decrypter, false);
 }
 /**
  * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
  * @param string                                                  $service_name
  * @param array                                                   $bundle_config
  */
 private function updateJoseBundleConfigurationForJWTLoader(ContainerBuilder $container, $service_name, array $bundle_config)
 {
     $decrypter = null;
     if (true === $bundle_config['encryption']['enabled']) {
         $decrypter = sprintf('jose.decrypter.%s', $service_name);
     }
     ConfigurationHelper::addJWTLoader($container, $service_name, sprintf('jose.verifier.%s', $service_name), sprintf('jose.checker.%s', $service_name), $decrypter, false);
 }
 /**
  * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
  * @param array                                                   $bundle_config
  */
 private function addJWKSets(ContainerBuilder $container, array $bundle_config)
 {
     $signature_key_configuration = $bundle_config['signature_key_configuration'];
     $signature_key_configuration['use'] = 'sig';
     $signature_key_configuration['alg'] = $bundle_config['signature_algorithm'];
     $signature_storage_path = sprintf('%s/signature.jwkset', $bundle_config['key_storage_folder']);
     ConfigurationHelper::addRandomJWKSet($container, sprintf('%s_signature_keyset', $this->getAlias()), $signature_storage_path, 3, $signature_key_configuration, true, true);
     if (true === $bundle_config['encryption']['enabled']) {
         $encryption_key_configuration = $bundle_config['encryption']['encryption_key_configuration'];
         $encryption_key_configuration['use'] = 'enc';
         $encryption_key_configuration['alg'] = $bundle_config['encryption']['key_encryption_algorithm'];
         $encryption_storage_path = sprintf('%s/encryption.jwkset', $bundle_config['key_storage_folder']);
         ConfigurationHelper::addRandomJWKSet($container, sprintf('%s_encryption_keyset', $this->getAlias()), $encryption_storage_path, 3, $encryption_key_configuration, true, true);
     }
 }