Esempio n. 1
0
 /**
  * Validate signature
  *
  * @throws Mage_Oauth_Exception
  */
 protected function _validateSignature()
 {
     $util = new Zend_Oauth_Http_Utility();
     $calculatedSign = $util->sign(array_merge($this->_params, $this->_protocolParams), $this->_protocolParams['oauth_signature_method'], $this->_consumer->getSecret(), $this->_token->getSecret(), $this->_request->getMethod(), $this->_request->getScheme() . '://' . $this->_request->getHttpHost() . $this->_request->getRequestUri());
     if ($calculatedSign != $this->_protocolParams['oauth_signature']) {
         $this->_throwException('', self::ERR_SIGNATURE_INVALID);
     }
 }