Scroll to navigation

Net::Google::AuthSub::Response(3pm) User Contributed Perl Documentation Net::Google::AuthSub::Response(3pm)

NAME

Net::Google::AuthSub::Response - a response from a Net::Google::AuthSub request

SYNOPSIS

    my $response = $auth->login($user, $pass);
    
    if ($response->is_success) {
        print "Yay!\n";
    } else {
        if ($response->error eq 'CaptchaRequired') {
            print "Captcha Image ".$response->captchaurl;
        }
    }

METHODS

new "HTTP::Response" "base url"

Create a new response.

is_success

Returns whether the response was a sucess or not.

SUCCESS METHODS

Methods available if the response was a success.

auth

The authorisation token if the response is a success.

sid

Not used yet.

lsid

Not used yet.

ERROR METHODS

Methods available if the response was an error.

error

The error code. Can be one of

The login request used a username or password that is not recognized.
The account email address has not been verified. The user will need toaccess their Google account directly to resolve the issue before loggingin using a non-Google application.
The user has not agreed to terms. The user will need to access theirGoogle account directly to resolve the issue before logging in using anon-Google application.
A CAPTCHA is required. (A response with this error code will alsocontain an image URL and a CAPTCHA token.)
The error is unknown or unspecified; the request contained invalid inputor was malformed.
The user account has been deleted.
The user account has been disabled.
The user's access to the specified service has been disabled. (The useraccount may still be valid.)
The service is not available; try again later.

url

The url of a page describing the error.

captchatoken

The token required to authenticate a captcha.

captchaurl

The full url of the captcha image.

2022-10-13 perl v5.34.0