文字

OAuth 类

(PECL OAuth >= 0.99.1)

简介

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

类摘要

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

属性

debug

sslChecks

debugInfo

Table of Contents

  • 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 版本
上一篇: 下一篇: