The OAuth extension provides a simple interface to interact with data providers using the OAuth HTTP specification to protect private resources.
Methods | ||||
---|---|---|---|---|
public
|
__construct(
string $consumer_key,
string $consumer_secret,
string $signature_method = OAUTH_SIG_METHOD_HMACSHA1,
int $auth_type = OAUTH_AUTH_TYPE_AUTHORIZATION,
)
Create a new OAuth object
|
# | ||
public
|
disableDebug(): bool
Turn off verbose debugging
Turn off verbose debugging |
# | ||
public
|
disableRedirects(): void
Turn off redirects
Turn off redirects |
# | ||
public
|
disableSSLChecks(): bool
Turn off SSL checks
Turn off SSL checks |
# | ||
public
|
enableDebug(): bool
Turn on verbose debugging
Turn on verbose debugging |
# | ||
public
|
enableRedirects(): bool
Turn on redirects
Turn on redirects |
# | ||
public
|
enableSSLChecks(): bool
Turn on SSL checks
Turn on SSL checks |
# | ||
public
|
setTimeout(int $timeout): void
Set the timeout
Set the timeout Parameters
|
# | ||
public
|
fetch(
string $protected_resource_url,
array $extra_parameters = [],
string $http_method = null,
array $http_headers = [],
): mixed
Fetch an OAuth-protected resource
|
# | ||
public
|
getAccessToken(string $access_token_url, string $auth_session_handle = null, string $verifier_token = null): array
Fetch an access token
|
# | ||
public
|
getCAPath(): array
Get CA information
Get CA information |
# | ||
public
|
getLastResponse(): string
Get the last response
Get the last response |
# | ||
public
|
getLastResponseHeaders(): string|false
Get headers for last response
Get headers for last response |
# | ||
public
|
getLastResponseInfo(): array
Get HTTP information about the last response
Get HTTP information about the last response |
# | ||
public
|
getRequestHeader(string $http_method, string $url, mixed $extra_parameters = ''): string|false
Generate OAuth header string signature
Generate OAuth header string signature |
# | ||
public
|
getRequestToken(string $request_token_url, string $callback_url = null, string $http_method = 'GET'): array
Fetch a request token
|
# | ||
public
|
setAuthType(int $auth_type): bool
Set authorization type
Set authorization type |
# | ||
public
|
setCAPath(string $ca_path = null, string $ca_info = null): mixed
Set CA path and info
Set CA path and info |
# | ||
public
|
setNonce(string $nonce): mixed
Set the nonce for subsequent requests
Set the nonce for subsequent requests |
# | ||
public
|
setRequestEngine(int $reqengine): void
|
# | ||
public
|
setRSACertificate(string $cert): mixed
Set the RSA certificate
Set the RSA certificate |
# | ||
public
|
setTimestamp(string $timestamp): mixed
Set the timestamp
Set the timestamp |
# | ||
public
|
setToken(string $token, string $token_secret): bool
Set the token and secret
Set the token and secret |
# | ||
public
|
setVersion(string $version): bool
Set the OAuth version
Set the OAuth version |
# |
Properties | |||
---|---|---|---|
public
|
bool
|
$debug
|
# |
public
|
bool
|
$sslChecks
|
# |
public
|
array
|
$debugInfo
|
# |