OAuth 类
(PECL OAuth >= 0.99.1)
简介
此 OAuth 扩展提供一个简单接口使用 OAuth HTTP 规范与数据提供者互动,以便保护私有资源。
类摘要
class OAuth
{
/* 属性 */
public
$debug;
public
$sslChecks;
public
$debugInfo;
/* 方法 */
public __construct(
string
string
string
int
)
string
$consumer_key
,string
$consumer_secret
,string
$signature_method
= OAUTH_SIG_METHOD_HMACSHA1
,int
$auth_type
= 0)
public fetch(
string
array
string
array
): mixed
string
$protected_resource_url
,array
$extra_parameters
= ?,string
$http_method
= ?,array
$http_headers
= ?): mixed
public generateSignature(string
$http_method
, string $url
, mixed $extra_parameters
= ?): string|falsepublic getAccessToken(
string
string
string
string
): array
string
$access_token_url
,string
$auth_session_handle
= ?,string
$verifier_token
= ?,string
$http_method
= ?): array
public getRequestHeader(string
$http_method
, string $url
, mixed $extra_parameters
= ?): string|falsepublic getRequestToken(string
}$request_token_url
, string $callback_url
= ?, string $http_method
= ?): array属性
- debug
- sslChecks
- debugInfo
目录
- OAuth::__construct — 新建一个 OAuth 对象
- OAuth::__destruct — 析构函数
- OAuth::disableDebug — 关闭详细的调试
- OAuth::disableRedirects — 关闭重定向
- OAuth::disableSSLChecks — 关闭 SSL 检查
- OAuth::enableDebug — 启用详细调试
- OAuth::enableRedirects — 启用重定向
- OAuth::enableSSLChecks — 启用 SSL 检查
- OAuth::fetch — 获取一个 OAuth 受保护的资源
- OAuth::generateSignature — 生成一个签名
- OAuth::getAccessToken — 获取一个访问令牌
- OAuth::getCAPath — 获取 CA 信息
- OAuth::getLastResponse — 获取最后一次的响应
- OAuth::getLastResponseHeaders — 获取最后一次响应的头信息
- OAuth::getLastResponseInfo — 获取关于最后一次响应的 HTTP 信息
- OAuth::getRequestHeader — 生成 OAuth 头信息字符串签名
- OAuth::getRequestToken — 获取一个请求令牌
- OAuth::setAuthType — 设置授权类型
- OAuth::setCAPath — 设置 CA 路径和信息
- OAuth::setNonce — 为后续请求设置现时标志
- OAuth::setRequestEngine — 设置目标请求引擎
- OAuth::setRSACertificate — 设置 RSA 证书
- OAuth::setSSLChecks — 调整特定的SSL请求检查
- OAuth::setTimestamp — 设置时间戳
- OAuth::setToken — 设置令牌和 secret
- OAuth::setVersion — 设置 OAuth 版本
+添加备注
用户贡献的备注
此页面尚无用户贡献的备注。