Skip to content

Commit

Permalink
Updated authentication, renamed flag 'api_key' to 'api-key' in altumo…
Browse files Browse the repository at this point in the history
…:make-geckoboard-request
  • Loading branch information
russpoutine committed Jun 15, 2012
1 parent 9234cfb commit 8253a5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/task/sfAltumoMakeGeckoboardRequestTask.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected function configure()
// add your own options here

new sfCommandOption( 'url', null, sfCommandOption::PARAMETER_REQUIRED, 'Url to request', null ),
new sfCommandOption( 'api_key', null, sfCommandOption::PARAMETER_REQUIRED, 'API key to authenticate with', null ),
new sfCommandOption( 'api-key', null, sfCommandOption::PARAMETER_REQUIRED, 'API key to authenticate with', null ),
));

$this->namespace = 'altumo';
Expand All @@ -43,9 +43,10 @@ protected function execute($arguments = array(), $options = array())

$request = new \Altumo\Http\OutgoingHttpRequest( $url );
$request->setVerifySslPeer( false );
$request->addHeader( 'Authorization', sprintf( 'Basic %s', $api_key ) );
$request->addHeader( 'Authorization', sprintf( 'Basic X:%s', $api_key ) );
echo $request->send();

}
}


0 comments on commit 8253a5b

Please sign in to comment.