Constructs a new OAuth client.
Constructs a new OAuth client.
OAuthClient
OAuthClient
($consumer $consumer, [$token $token = NULL], [$oauthParamsLocation $oauthParamsLocation = OAUTH_PARAMS_IN_HEADERS], [$signatureMethod $signatureMethod = OAUTH_SIGNATURE_HMAC_SHA1])
-
$consumer
$consumer: The OAuthConsumer object to use for the requests.
-
$token
$token: The OAuthToken to use for the requests. Optional.
-
$oauthParamsLocation
$oauthParamsLocation: OAUTH_PARAMS_IN_HEADERS or OAUTH_PARAMS_IN_POST_BODY, depending on where you want the OAuth parameters to show up. Optional, defaults to using the headers.
-
$signatureMethod
$signatureMethod: OAUTH_SIGNATURE_PLAINTEXT or OAUTH_SIGNATURE_HMAC_SHA1, depending on what request signing mechanism to use. Optional, defaults to HMAC SHA1 signatures.
Checks to see if the code and headers indicate an expired OAuth token.
Checks to see if the code and headers indicate an expired OAuth token. If so, requests a new one.
void
checkExpired
( $code, $headerParser)
Executes a properly signed OAuth HTTP DELETE request.
Executes a properly signed OAuth HTTP DELETE request.
The
delete
($url $url, [$queryParameters $queryParameters = array()], [$timeout $timeout = NULL])
-
$url
$url: The URL to request.
-
$queryParameters
$queryParameters: Any query string parameters to be sent in the request.
-
$timeout
$timeout: Optional, the number of seconds to wait for the request to return.
Executes a properly signed OAuth HTTP GET request.
Executes a properly signed OAuth HTTP GET request.
The
get
($url $url, [$queryParameters $queryParameters = array()], [$timeout $timeout = NULL])
-
$url
$url: The URL to request.
-
$queryParameters
$queryParameters: Any query string parameters to be sent in the request.
-
$timeout
$timeout: Optional, the number of seconds to wait for the request to return.
Executes a properly signed OAuth HTTP POST request.
Executes a properly signed OAuth HTTP POST request.
The
post
($url $url, [$contentType $contentType = "application/x-www-form-urlencoded"], [$content $content = array()], [$timeout $timeout = NULL])
-
$url
$url: The URL to request.
-
$contentType
$contentType: The Content-Type of the POST data.
-
$content
$content: The content to be POST.
-
$timeout
$timeout: Optional, the number of seconds to wait for the request to return.
Executes a properly signed OAuth HTTP PUT request.
Executes a properly signed OAuth HTTP PUT request.
The
put
($url $url, $contentType $contentType, $content $content, [$timeout $timeout = NULL])
-
$url
$url: The URL to request.
-
$contentType
$contentType: The Content-Type of the PUT data.
-
$content
$content: The raw content to be PUT.
-
$timeout
$timeout: Optional, the number of seconds to wait for the request to return.