大网数据广告活动
PHP 语言与运行手册

OAuth 类

· 52CE 我爱测

此 OAuth 扩展提供一个简单接口使用 OAuth HTTP 规范与数据提供者互动,以便保护私有资源。

OAuth 类

(PECL OAuth >= 0.99.1)

简介

此 OAuth 扩展提供一个简单接口使用 OAuth HTTP 规范与数据提供者互动,以便保护私有资源。

类摘要

class OAuth {
/* 属性 */
public $debug;
public $sslChecks;
public $debugInfo;
/* 方法 */
public function __construct(
    string $consumer_key,
    string $consumer_secret,
    string $signature_method = OAUTH_SIG_METHOD_HMACSHA1,
    int $auth_type = 0
)
public function __destruct(): void
public function disableDebug(): bool
public function disableRedirects(): bool
public function disableSSLChecks(): bool
public function enableDebug(): bool
public function enableRedirects(): bool
public function enableSSLChecks(): bool
public function fetch(
    string $protected_resource_url,
    array $extra_parameters = ?,
    string $http_method = ?,
    array $http_headers = ?
): mixed
public function generateSignature(string $http_method, string $url, mixed $extra_parameters = ?): string|false
public function getAccessToken(
    string $access_token_url,
    string $auth_session_handle = ?,
    string $verifier_token = ?,
    string $http_method = ?
): array
public function getCAPath(): array
public function getLastResponse(): string
public function getLastResponseInfo(): array
public function getRequestHeader(string $http_method, string $url, mixed $extra_parameters = ?): string|false
public function getRequestToken(string $request_token_url, string $callback_url = ?, string $http_method = ?): array
public function setAuthType(int $auth_type): bool
public function setCAPath(string $ca_path = ?, string $ca_info = ?): mixed
public function setNonce(string $nonce): mixed
public function setRequestEngine(int $reqengine): void
public function setRSACertificate(string $cert): mixed
public function setSSLChecks(int $sslcheck): bool
public function setTimestamp(string $timestamp): mixed
public function setToken(string $token, string $token_secret): bool
public function setVersion(string $version): bool
}

属性

debug

sslChecks

debugInfo

目录

来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
PHP Documentation Group
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。