OAuth::__construct

(PECL OAuth >= 0.99.1)

OAuth::__construct新しい OAuth オブジェクトを作成する

説明

public OAuth::__construct(
    string $consumer_key,
    string $consumer_secret,
    string $signature_method = OAUTH_SIG_METHOD_HMACSHA1,
    int $auth_type = 0
)

新しい OAuth オブジェクトを作成します。

パラメータ

consumer_key

サービスプロバイダが提供する consumer key。

consumer_secret

サービスプロバイダが提供する consumer secret。

signature_method

このオプションのパラメータで、使用する署名方式を定義します。 デフォルトは OAUTH_SIG_METHOD_HMACSHA1 (HMAC-SHA1) です。

auth_type

このオプションのパラメータで、OAuth パラメータをコンシューマに渡す方法を定義します。 デフォルトは OAUTH_AUTH_TYPE_AUTHORIZATION (Authorization ヘッダを使用する) です。

add a note add a note

User Contributed Notes 2 notes

up
4
mgfrobozz at gmail dot com
7 years ago
The signature methods available as of oauth-1.2.3 are:
OAUTH_SIG_METHOD_HMACSHA1
OAUTH_SIG_METHOD_HMACSHA256
OAUTH_SIG_METHOD_RSASHA1
OAUTH_SIG_METHOD_PLAINTEXT
up
0
mgfrobozz at gmail dot com
7 years ago
The authorization type enums as of oauth-1.2.3 are
OAUTH_AUTH_TYPE_AUTHORIZATION
OAUTH_AUTH_TYPE_URI
OAUTH_AUTH_TYPE_FORM
OAUTH_AUTH_TYPE_NONE
To Top