PHP Conference Japan 2024

OAuth 類別

(PECL OAuth >= 0.99.1)

簡介

OAuth 擴充套件提供了一個簡單的介面,可以使用 OAuth HTTP 規範與資料供應商互動以保護私人資源。

類別概要

class OAuth {
/* 屬性 */
public $debug;
public $sslChecks;
public $debugInfo;
/* 方法 */
公開 __construct(
    字串 $consumer_key,
    字串 $consumer_secret,
    字串 $signature_method = OAUTH_SIG_METHOD_HMACSHA1,
    整數 $auth_type = 0
)
公開 __destruct():
公開 fetch(
    字串 $protected_resource_url,
    陣列 $extra_parameters = ?,
    字串 $http_method = ?,
    陣列 $http_headers = ?
): 混合
公開 generateSignature(字串 $http_method, 字串 $url, 混合 $extra_parameters = ?): 字串|false
公開 getAccessToken(
    字串 $access_token_url,
    字串 $auth_session_handle = ?,
    字串 $verifier_token = ?,
    字串 $http_method = ?
): 陣列
公開 getCAPath(): 陣列
公開 getRequestHeader(字串 $http_method, 字串 $url, 混合 $extra_parameters = ?): 字串|false
公開 getRequestToken(字串 $request_token_url, 字串 $callback_url = ?, 字串 $http_method = ?): 陣列
公開 setAuthType(整數 $auth_type): 布林值
公開 setCAPath(字串 $ca_path = ?, 字串 $ca_info = ?): 混合
公開 setNonce(字串 $nonce): 混合
公開 setRequestEngine(整數 $reqengine):
公開 setSSLChecks(整數 $sslcheck): 布林值
公開 setTimestamp(字串 $timestamp): 混合
公開 setToken(字串 $token, 字串 $token_secret): 布林值
公開 設定版本(字串 $version): 布林值
}

屬性

除錯

SSL 檢查

除錯資訊

目錄

新增註釋

使用者貢獻的註釋

此頁面沒有使用者貢獻的註釋。
To Top