Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function validateAccessTokenRequest($params, $requestUrl, $httpMethod = 'POST')
 {
     $required = ['oauth_consumer_key', 'oauth_signature', 'oauth_signature_method', 'oauth_nonce', 'oauth_timestamp', 'oauth_token'];
     $this->_validateProtocolParams($params, $required);
     $consumer = $this->_tokenProvider->getConsumerByKey($params['oauth_consumer_key']);
     $tokenSecret = $this->_tokenProvider->validateAccessTokenRequest($params['oauth_token'], $consumer);
     $this->_validateSignature($params, $consumer->getSecret(), $httpMethod, $requestUrl, $tokenSecret);
     return $consumer->getId();
 }