Skip to content

Commit

Permalink
reactivated wsse functionality; fix wsse not working? #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Preusner committed Jun 14, 2015
1 parent b5b32bd commit e51ee01
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions DependencyInjection/GuzzleExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ public function load(array $configs, ContainerBuilder $container) {
$container->setParameter('guzzle.plugin.header.headers', $config['headers']);

// WSSE
if(isset($config['plugin']['wsse']) && $wsse = $config['plugin']['wsse']) {
if(isset($config['plugin']['wsse'])
&& $username = $config['plugin']['wsse']['username']
&& $password = $config['plugin']['wsse']['password']) {

$container->setParameter('guzzle.plugin.wsse.username', $wsse['username']);
$container->setParameter('guzzle.plugin.wsse.password', $wsse['password']);
$container->setParameter('guzzle.plugin.wsse.username', $username);
$container->setParameter('guzzle.plugin.wsse.password', $password);

$container->getDefinition('guzzle.handler')
->addMethodCall('push', array(new Expression('service("guzzle_bundle.middleware.wsse").attach()')));
Expand Down

0 comments on commit e51ee01

Please sign in to comment.