NAME
WWW::Google::ClientLogin - Yet Another Google ClientLogin Client Library
SYNOPSIS
use WWW::Google::ClientLogin;
my $client = WWW::Google::ClientLogin->new(
email => 'example@gmail.com',
password => 'password',
service => 'ac2dm',
);
my $res = $client->authenticate;
die $res->status_line if $res->is_error;
my $auth_token = $res->auth_token;
DESCRIPTION
WWW::Google::ClientLogin is a Google ClientLogin client.
SEE ALSO http://code.google.com/intl/us/apis/accounts/docs/AuthForInstalledApps.html
Why I wrote this module? I know WWW::Google::Auth::ClientLogin module already exists, but I feel the return value is difficult to use. I want a response object.
METHODS
new(%args)
Create a WWW::Google::ClientLogin instance.
my $client = WWW::Google::ClientLogin->new(
email => example@gmail.com,
password => 'password',
service => 'ac2dm',
);
Supported options are:
- email : Str
-
Required. User's full email address. It must include the domain (i.e. johndoe@gmail.com).
- password : Str
-
Required. User's password.
- service : Str
-
Required. Each service using the Authorization service is assigned a name value. for example, the name associated with Google Calendar is
'cl'
. - type : Str
-
Optional. Type of account to request authorization. default type is
HOSTED_OR_GOOGLE
. - source : Str
-
Optional. Short string identifying your application, for logging purposes.
- logintoken : Str
-
Optional. Token representing the specific CAPTCHA challenge.
- logincaptcha : Str
-
Optional. String entered by the user as an answer to a CAPTCHA challenge.
- ua : LWP::UserAgent
-
Optional.
SEE ALSO http://code.google.com/intl/us/apis/accounts/docs/AuthForInstalledApps.html#Request.
authenticate()
Send authentication request for Google ClientLogin. Returned WWW::Google::ClientLogin::Response object.
my $res = $client->authenticate;
die $res->error_code if $res->is_error;
my $auth_token = $res->auth_token;
AUTHOR
xaicron <xaicron@cpan.org>
COPYRIGHT
Copyright 2011 - xaicron
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.