![]() |
![]()
| ![]() |
![]()
NAMENet::HTTP::Spore::Middleware::Auth::OAuth - middleware for OAuth authentication VERSIONversion 0.09 SYNOPSISmy $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}; } DESCRIPTIONNet::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. AUTHORS
COPYRIGHT AND LICENSEThis 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.
|