• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • OAuth::__construct()

    (PECL OAuth >= 0.99.1)

    新建一个 OAuth 对象

    说明

    publicOAuth::__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头部)。

    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
    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