Definition at line 34 of file AccessToken.php.
◆ _attemptRequest()
_attemptRequest |
( |
array |
$params | ) |
|
|
protected |
Attempt a request based on the current configured OAuth Request Scheme and return the resulting HTTP Response.
- Parameters
-
- Returns
- Zend_Http_Response
Definition at line 152 of file AccessToken.php.
154 switch ($this->_preferredRequestScheme) {
163 $this->_consumer->getAccessTokenUrl());
166 return $httpClient->request();
const REQUEST_SCHEME_HEADER
getRequestSchemeQueryStringClient(array $params, $url)
const REQUEST_SCHEME_QUERYSTRING
getRequestSchemeHeaderClient(array $params)
getRequestSchemePostBodyClient(array $params)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
const REQUEST_SCHEME_POSTBODY
◆ _cleanParamsOfIllegalCustomParameters()
_cleanParamsOfIllegalCustomParameters |
( |
array |
$params | ) |
|
|
protected |
Access Token requests specifically may not contain non-OAuth parameters. So these should be striped out and excluded. Detection is easy since specified OAuth parameters start with "oauth_", Extension params start with "xouth_", and no other parameters should use these prefixes.
xouth params are not currently allowable.
- Parameters
-
- Returns
- array
Definition at line 180 of file AccessToken.php.
183 if (!preg_match(
"/^oauth_/", $key)) {
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ assembleParams()
Assemble all parameters for an OAuth Access Token request.
- Returns
- array
Definition at line 61 of file AccessToken.php.
64 'oauth_consumer_key' => $this->_consumer->getConsumerKey(),
65 'oauth_nonce' => $this->_httpUtility->generateNonce(),
66 'oauth_signature_method' => $this->_consumer->getSignatureMethod(),
67 'oauth_timestamp' => $this->_httpUtility->generateTimestamp(),
68 'oauth_token' => $this->_consumer->getLastRequestToken()->getToken(),
69 'oauth_version' => $this->_consumer->getVersion(),
72 if (!empty($this->_parameters)) {
76 $params[
'oauth_signature'] = $this->_httpUtility->sign(
78 $this->_consumer->getSignatureMethod(),
79 $this->_consumer->getConsumerSecret(),
80 $this->_consumer->getLastRequestToken()->getTokenSecret(),
82 $this->_consumer->getAccessTokenUrl()
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ execute()
Initiate a HTTP request to retrieve an Access Token.
- Returns
- Zend_Oauth_Token_Access
Definition at line 48 of file AccessToken.php.
startRequestCycle(array $params)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ getRequestSchemeHeaderClient()
getRequestSchemeHeaderClient |
( |
array |
$params | ) |
|
Generate and return a HTTP Client configured for the Header Request Scheme specified by OAuth, for use in requesting an Access Token.
- Parameters
-
- Returns
- Zend_Http_Client
Definition at line 95 of file AccessToken.php.
101 $client->setUri($this->_consumer->getAccessTokenUrl());
102 $client->setHeaders(
'Authorization', $headerValue);
103 $client->setMethod($this->_preferredRequestMethod);
_toAuthorizationHeader(array $params, $realm=null)
_cleanParamsOfIllegalCustomParameters(array $params)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ getRequestSchemePostBodyClient()
getRequestSchemePostBodyClient |
( |
array |
$params | ) |
|
Generate and return a HTTP Client configured for the POST Body Request Scheme specified by OAuth, for use in requesting an Access Token.
- Parameters
-
- Returns
- Zend_Http_Client
Definition at line 115 of file AccessToken.php.
119 $client->setUri($this->_consumer->getAccessTokenUrl());
120 $client->setMethod($this->_preferredRequestMethod);
122 $this->_httpUtility->toEncodedQueryString(
$params)
_cleanParamsOfIllegalCustomParameters(array $params)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ getRequestSchemeQueryStringClient()
getRequestSchemeQueryStringClient |
( |
array |
$params, |
|
|
|
$url |
|
) |
| |
Generate and return a HTTP Client configured for the Query String Request Scheme specified by OAuth, for use in requesting an Access Token.
- Parameters
-
- Returns
- Zend_Http_Client
Definition at line 139 of file AccessToken.php.
142 return parent::getRequestSchemeQueryStringClient(
$params,
$url);
_cleanParamsOfIllegalCustomParameters(array $params)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ $_httpClient
The documentation for this class was generated from the following file: