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

Class: OAuthUtils

Source Location: /Common/Util/OAuthUtils.php

Class Overview


A utility class for working with OAuth.


Methods



Class Details

[line 33]
A utility class for working with OAuth.



[ Top ]


Class Methods


static method FormatParametersForHeader [line 172]

static string FormatParametersForHeader( array $oauthParameters)

Formats OAuth parameters for use in an HTTP header.

For example: param1="value1", param2="value2"




Tags:

return:  the parameters formatted for use in an HTTP header
access:  public


Parameters:

array   $oauthParameters   the OAuth parameters

[ Top ]

static method FormatParametersForUrl [line 162]

static string FormatParametersForUrl( array $oauthParameters)

Formats OAuth parameters for use in a URL.

For example: param1=value1&param2=value2.




Tags:

return:  the parameters formatted for use in a URL
access:  public


Parameters:

array   $oauthParameters   the OAuth parameters

[ Top ]

static method GetAccessToken [line 107]

static array GetAccessToken( array $oauthInfo, string $verifier, string $server)

Gets the access token for an authorized request token.



Tags:

return:  the OAuth info, including the consumer key, consumer secret, token, and token secret
see:  AccessToken
access:  public


Parameters:

array   $oauthInfo   the OAuth info, including the consumer key, consumer secret, token, and token secret
string   $verifier   the OAuth verifier code returned with the callback
string   $server   the OAuth server to make the request against

[ Top ]

static method GetAuthorizationUrl [line 87]

static string GetAuthorizationUrl( array $oauthInfo, string $server)

Gets the authorization URL for a request token.



Tags:

return:  an authorization URL to redirect the user to
see:  GetAuth
access:  public


Parameters:

array   $oauthInfo   the OAuth info, including the token
string   $server   the OAuth server to generate the URL for

[ Top ]

static method GetRequestToken [line 60]

static array GetRequestToken( array $oauthInfo, string $scope, string $server, [string $callbackUrl = NULL], [string $applicationName = NULL])

Gets a request token.



Tags:

return:  the OAuth info, including the consumer key, consumer secret, token, and token secret
see:  RequestToken
access:  public


Parameters:

array   $oauthInfo   the OAuth info, including the consumer key and consumer secret
string   $scope   the scope of the application to authorize
string   $server   the OAuth server to make the request against
string   $callbackUrl   optional callback URL
string   $applicationName   optional name of the application to display on the authorization redirect page

[ Top ]

static method GetSignedRequestParameters [line 129]

static array GetSignedRequestParameters( array $oauthInfo, string $url)

Gets the signed OAuth parameters needed to make a request against the given URL.



Tags:

return:  an array of OAuth parameter names to values
access:  public


Parameters:

array   $oauthInfo   the OAuth info, including the consumer key, consumer secret, token, and token secret
string   $url   the URL the request will be made against

[ Top ]


Documentation generated by phpDocumentor 1.4.3