NAME
Net::HTTP::Spore::Middleware::Auth::OAuth - middleware for OAuth authentication
VERSION
version 0.05
SYNOPSIS
my $client = Net::HTTP::Spore->new_from_spec( 'google-url-shortener.json' );
$client->enable('Format::JSON');
$client->enable('Auth::OAuth',
oauth_consumer_key => '00000000.apps.googleusercontent.com',
oauth_consumer_secret => 'xxxxxxxxx',
oauth_token => 'yyyyyyyyy',
oauth_token_secret => 'zzzzzzzzz',
);
my $r = $client->insert( payload => { longUrl => 'http://f.lumberjaph.net/' } );
say( $r->body->{id} . ' is ' . $r->body->{longUrl} );
say "list >";
$r = $client->list();
foreach my $short (@{$r->body->{items}}){
say $short->{id} . ' ' . $short->{longUrl};
}
DESCRIPTION
Net::HTTP::Spore::Middleware::Auth::OAuth is a middleware to handle OAuth mechanism. This middleware should be loaded as the last middleware, because it requires all parameters to be setted to calculate the signature.
AUTHOR
franck cuny <franck@lumberjaph.net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by linkfluence.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.