Property | Type | Description | |
---|---|---|---|
$accessTokenMethod | access token HTTP method. | ||
$accessTokenUrl | OAuth access token URL. | ||
$authorizationHeaderMethods | list of the request methods, which require adding 'Authorization' header. By default only POST requests will have 'Authorization' header. You may set this option to null in order to make all requests to use 'Authorization' header. | ||
$consumerKey | OAuth consumer key. | ||
$consumerSecret | OAuth consumer secret. | ||
$requestTokenMethod | request token HTTP method. | ||
$requestTokenUrl | OAuth request token URL. | ||
$version | protocol version. |
Method | Description | |
---|---|---|
applyAccessTokenToRequest ( $request, $accessToken ) | ||
beforeRequestSend ( |
Handles [[Request::EVENT_BEFORE_SEND]] event. | |
buildAuthUrl ( |
Composes user authorization URL. | |
createApiRequest ( ) | ||
createRequest ( ) | ||
fetchAccessToken ( string $oauthToken = null, |
Fetches OAuth access token. | |
fetchRequestToken ( array $params = [] ) : |
Fetches the OAuth request token. | |
refreshAccessToken ( |
Gets new auth token to replace expired one. | |
signRequest ( |
Sign given request with [[signatureMethod]]. |
Method | Description | |
---|---|---|
composeAuthorizationHeader ( array $params, string $realm = '' ) : array | Composes authorization header. | |
composeSignatureBaseString ( string $method, string $url, array $params ) : string | Creates signature base string, which will be signed by [[signatureMethod]]. | |
composeSignatureKey ( |
Composes request signature key. | |
defaultReturnUrl ( ) : string | Composes default [[returnUrl]] value. | |
generateCommonRequestParams ( ) : array | Generate common request params like version, timestamp etc. | |
generateNonce ( ) : string | Generates nonce value. | |
generateTimestamp ( ) : integer | Generates timestamp. |
public applyAccessTokenToRequest ( $request, $accessToken ) |
public beforeRequestSend ( |
||
$event | event instance. |
public buildAuthUrl ( |
||
$requestToken | OAuth request token. | |
$params | array | additional request params. |
return | string | authorize URL |
protected composeSignatureKey ( |
||
$token | OAuth token to be used for signature key. | |
return | string | signature key. |
protected defaultReturnUrl ( ) : string | ||
return | string | return URL. |
public fetchAccessToken ( string $oauthToken = null, |
||
$oauthToken | string | OAuth token returned with redirection back to client. |
$requestToken | OAuth request token. | |
$oauthVerifier | string | OAuth verifier. |
$params | array | additional request params. |
return | OAuth access token. |
public fetchRequestToken ( array $params = [] ) : |
||
$params | array | additional request params. |
return | request token. |
protected generateCommonRequestParams ( ) : array | ||
return | array | common request params. |
protected generateNonce ( ) : string | ||
return | string | nonce value. |
protected generateTimestamp ( ) : integer | ||
return | integer | timestamp. |
public refreshAccessToken ( |
||
$token | expired auth token. | |
return | new auth token. |
public signRequest ( |
||
$request | request instance. | |
$token | OAuth token to be used for signature, if not set [[accessToken]] will be used. |
public $authorizationHeaderMethods |