首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

OAuth (class)

Introduction

(PECL OAuth >= 0.99.1)

The OAuth extension provides a simple interface to interact with data providers using the OAuth HTTP specification to protect private resources.

Class synopsis

OAuth {

/* Properties */

public $debug ;

public $sslChecks ;

public $debugInfo ;

/* Methods */

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

}

Properties

debugsslChecksdebugInfo

Table of Contents

  • OAuth::__construct — Create a new OAuth object
  • OAuth::__destruct — The destructor
  • OAuth::disableDebug — Turn off verbose debugging
  • OAuth::disableRedirects — Turn off redirects
  • OAuth::disableSSLChecks — Turn off SSL checks
  • OAuth::enableDebug — Turn on verbose debugging
  • OAuth::enableRedirects — Turn on redirects
  • OAuth::enableSSLChecks — Turn on SSL checks
  • OAuth::fetch — Fetch an OAuth protected resource
  • OAuth::generateSignature — Generate a signature
  • OAuth::getAccessToken — Fetch an access token
  • OAuth::getCAPath — Gets CA information
  • OAuth::getLastResponse — Get the last response
  • OAuth::getLastResponseHeaders — Get headers for last response
  • OAuth::getLastResponseInfo — Get HTTP information about the last response
  • OAuth::getRequestHeader — Generate OAuth header string signature
  • OAuth::getRequestToken — Fetch a request token
  • OAuth::setAuthType — Set authorization type
  • OAuth::setCAPath — Set CA path and info
  • OAuth::setNonce — Set the nonce for subsequent requests
  • OAuth::setRequestEngine — The setRequestEngine purpose
  • OAuth::setRSACertificate — Set the RSA certificate
  • OAuth::setSSLChecks — Tweak specific SSL checks for requests.
  • OAuth::setTimestamp — Set the timestamp
  • OAuth::setToken — Sets the token and secret
  • OAuth::setVersion — Set the OAuth version

← oauth_urlencode

OAuth::__construct →

代码语言:txt
复制
 ? 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com