Ejemplo n.º 1
0
 /**
  * Attempts to retrieve a Request Token from an OAuth Provider which is
  * later exchanged for an authorized Access Token used to access the
  * protected resources exposed by a web service API.
  *
  * @param  null|array $customServiceParameters Non-OAuth Provider-specified parameters
  * @param  null|string $httpMethod
  * @param  null|Zend_Oauth_Http_RequestToken $request
  * @return Zend_Oauth_Token_Request
  */
 public function getRequestToken(array $customServiceParameters = null, $httpMethod = null, Zend_Oauth_Http_RequestToken $request = null)
 {
     if ($request === null) {
         $request = new Zend_Oauth_Http_RequestToken($this, $customServiceParameters);
     } elseif ($customServiceParameters !== null) {
         $request->setParameters($customServiceParameters);
     }
     if ($httpMethod !== null) {
         $request->setMethod($httpMethod);
     } else {
         $request->setMethod($this->getRequestMethod());
     }
     $this->_requestToken = $request->execute();
     return $this->_requestToken;
 }