| Net-Google-AuthSub-Once documentation | view source | Contained in the Net-Google-AuthSub-Once distribution. |
Net::Google::AuthSub::Once - Make one secure authenticated request to a Google service
my $auth = Net::Google::AuthSub::Once->new();
redirect_to($auth->get_authorization_url('http://example.com/your-next-url'));
# Then after the response comes back
# Make a request to the Google service
my $auth = Net::Google::AuthSub::Once->new({ private_key_filename => 'filename' });
my $request = HTTP::Request->new(GET => 'http://www.google.com/...');
$auth->sign_request($request);
my $resp = $ua->request($request);
The nice thing about this module is that you don't need to know the Google login details of the user of your applications. You can make a secure request to a Google service in their place.
You must add your domain on Google for using secure requests. This module only supports secure requests. https://www.google.com/accounts/ManageDomains
Google has some information about create the private key file you need.
http://code.google.com/apis/gdata/docs/auth/authsub.html#Registered
The filename of a private key file.
Signs the HTTP::Request.
Peter Stuifzand <peter@stuifzand.eu>
Copyright, 2010 - Peter Stuifzand
Released under the same terms as Perl itself
| Net-Google-AuthSub-Once documentation | view source | Contained in the Net-Google-AuthSub-Once distribution. |