PHP Class SimpleOAuth2Handler, googleads-php-lib

Inheritance: extends OAuth2Handler
ファイルを表示 Open project: googleads/googleads-php-lib Class Usage Examples

Public Methods

Method Description
GetAccessToken ( array $credentials, $code, $redirectUri = null )
RefreshAccessToken ( array $credentials )
__construct ( array $scope = null, CurlUtils $curlUtils = null )

Protected Methods

Method Description
MakeRequest ( string $url, array $params ) : OAuthToken Makes an HTTP request to the given URL and extracts the returned OAuth2 response.

Method Details

GetAccessToken() public method

See also: OAuth2Hanlder::GetAccessToken()
public GetAccessToken ( array $credentials, $code, $redirectUri = null )
$credentials array

MakeRequest() protected method

Makes an HTTP request to the given URL and extracts the returned OAuth2 response.
protected MakeRequest ( string $url, array $params ) : OAuthToken
$url string the URL to make the request to
$params array the parameters to include in the POST body
return OAuthToken the returned token

RefreshAccessToken() public method

See also: OAuth2Hanlder::RefreshAccessToken()
public RefreshAccessToken ( array $credentials )
$credentials array

__construct() public method

public __construct ( array $scope = null, CurlUtils $curlUtils = null )
$scope array
$curlUtils CurlUtils optional, curl utility to be used for HTTP