Definition at line 34 of file SignatureAbstract.php.
◆ __construct()
__construct |
( |
|
$consumerSecret, |
|
|
|
$tokenSecret = null , |
|
|
|
$hashAlgo = null |
|
) |
| |
Constructor
- Parameters
-
string | $consumerSecret | |
null | string | $tokenSecret | |
null | string | $hashAlgo | |
- Returns
- void
Definition at line 68 of file SignatureAbstract.php.
70 $this->_consumerSecret = $consumerSecret;
71 if (isset($tokenSecret)) {
72 $this->_tokenSecret = $tokenSecret;
75 if (isset($hashAlgo)) {
76 $this->_hashAlgorithm = $hashAlgo;
◆ _assembleKey()
Assemble key from consumer and token secrets
- Returns
- string
Definition at line 115 of file SignatureAbstract.php.
117 $parts = array($this->_consumerSecret);
118 if ($this->_tokenSecret !==
null) {
121 foreach ($parts as $key => $secret) {
124 return implode(
'&', $parts);
◆ _getBaseSignatureString()
_getBaseSignatureString |
( |
array |
$params, |
|
|
|
$method = null , |
|
|
|
$url = null |
|
) |
| |
|
protected |
Get base signature string
- Parameters
-
array | $params | |
null | string | $method | |
null | string | $url | |
- Returns
- string
Definition at line 135 of file SignatureAbstract.php.
137 $encodedParams = array();
142 $baseStrings = array();
144 $baseStrings[] = strtoupper(
$method);
152 if (isset($encodedParams[
'oauth_signature'])) {
153 unset($encodedParams[
'oauth_signature']);
158 return implode(
'&', $baseStrings);
normaliseBaseSignatureUrl($url)
_toByteValueOrderedQueryString(array $params)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ _toByteValueOrderedQueryString()
_toByteValueOrderedQueryString |
( |
array |
$params | ) |
|
|
protected |
Transform an array to a byte value ordered query string
- Parameters
-
- Returns
- string
Definition at line 167 of file SignatureAbstract.php.
174 foreach (
$value as $keyduplicate) {
175 $return[] = $key .
'=' . $keyduplicate;
178 $return[] = $key .
'=' .
$value;
181 return implode(
'&', $return);
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ normaliseBaseSignatureUrl()
normaliseBaseSignatureUrl |
( |
|
$url | ) |
|
Normalize the base signature URL
- Parameters
-
- Returns
- string
Definition at line 96 of file SignatureAbstract.php.
98 $uri = Zend_Uri_Http::fromString(
$url);
99 if ($uri->getScheme() ==
'http' && $uri->getPort() ==
'80') {
101 }
elseif ($uri->getScheme() ==
'https' && $uri->getPort() ==
'443') {
105 $uri->setFragment(
'');
106 $uri->setHost(strtolower($uri->getHost()));
107 return $uri->getUri(
true);
elseif(isset( $params[ 'redirect_parent']))
◆ sign()
sign |
( |
array |
$params, |
|
|
|
$method = null , |
|
|
|
$url = null |
|
) |
| |
|
abstract |
Sign a request
- Parameters
-
array | $params | |
null | string | $method | |
null | string | $url | |
- Returns
- string
◆ $_consumerSecret
◆ $_hashAlgorithm
◆ $_key
◆ $_tokenSecret
The documentation for this class was generated from the following file: