lopnor/Net-Google-DataAPI — pull request #7 by shogo82148 (2014-10-25 14:26:24+00:00)
Title: support JSON Web Token

Hello
I want to use Service Account for authorization but Net::Google::DataAPI seems not to support it now.
So, I implemented [Using OAuth 2.0 for Server to Server Applications](https://developers.google.com/accounts/docs/OAuth2ServiceAccount).

`Net::Google::DataAPI::Auth::OAuth2::SignedJWT` uses private key instead of password for authorization.

``` perl
use Net::Google::DataAPI::Auth::OAuth2::SignedJWT;
my $oauth2 = Net::Google::DataAPI::Auth::OAuth2->new(
private_key => <<'__KEY__',
-----BEGIN PRIVATE KEY-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-----END PRIVATE KEY-----
__KEY__
service_account => 'xxxxxxx@developer.gserviceaccount.com',
scope => ['http://spreadsheets.google.com/feeds/'],
);
$oauth2->get_access_token or die;
my $client = Net::Google::Spreadsheets->new(auth => $oauth2);
```