Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getRequestToken($params, $requestUrl, $httpMethod = 'POST')
 {
     $this->_validateProtocolParams($params);
     $consumer = $this->_tokenProvider->getConsumerByKey($params['oauth_consumer_key']);
     $this->_tokenProvider->validateConsumer($consumer);
     $this->_validateSignature($params, $consumer->getSecret(), $httpMethod, $requestUrl);
     return $this->_tokenProvider->createRequestToken($consumer);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function getRequestToken($params, $requestUrl, $httpMethod = 'POST')
 {
     $this->_validateVersionParam($params['oauth_version']);
     $consumer = $this->_tokenProvider->getConsumerByKey($params['oauth_consumer_key']);
     $this->_tokenProvider->validateConsumer($consumer);
     $this->_nonceGenerator->validateNonce($consumer, $params['oauth_nonce'], $params['oauth_timestamp']);
     $this->_validateSignature($params, $consumer->getSecret(), $httpMethod, $requestUrl);
     return $this->_tokenProvider->createRequestToken($consumer);
 }