GoogleApiAdsCommon
[ class tree: GoogleApiAdsCommon ] [ index: GoogleApiAdsCommon ] [ all elements ]

Class: AuthToken

Source Location: /Common/Util/AuthToken.php

Class Overview


Client used to retrieve an authentication token for the supplied credentials with the client login API.


Methods



Class Details

[line 40]
Client used to retrieve an authentication token for the supplied credentials with the client login API.



[ Top ]


Class Methods


constructor __construct [line 62]

AuthToken __construct( string $email, string $password, string $service, string $source, [string $accountType = 'GOOGLE'], [string $server = NULL], [string $captchaToken = NULL], [string $captchaResponse = NULL])

Constructor for the authentication token.



Parameters:

string   $email   the email of the user
string   $password   the password of the user
string   $service   the service name
string   $source   the source name
string   $accountType   the account type. Defaults to GOOGLE
string   $server   the server to make the request to. Defaults to https://www.google.com
string   $captchaToken   captchaToken the token return with a CAPTCHA challenge
string   $captchaResponse   captchaResponse the response to a CAPTCHA challenge

[ Top ]

method GetAuthToken [line 80]

string GetAuthToken( )

Peforms a POST to get the auth token and then parses the result.



Tags:

return:  the auth token
throws:  AuthTokenException if an error occurs during authentication
access:  public


[ Top ]

method GetServer [line 157]

string GetServer( )

Returns the server to make requests to.



Tags:

return:  the server to make requests to
access:  public


[ Top ]


Documentation generated by phpDocumentor 1.4.3