Esempio n. 1
0
 /**
  * After a Request Token is retrieved, the user may be redirected to the
  * OAuth Provider to authorize the application's access to their
  * protected resources - the redirect URL being provided by this method.
  * Once the user has authorized the application for access, they are
  * redirected back to the application which can now exchange the previous
  * Request Token for a fully authorized Access Token.
  *
  * @param  null|array $customServiceParameters
  * @param  null|Zend\OAuth\Token\Request $token
  * @param  null|Zend\OAuth\HTTP\UserAuthorization $redirect
  * @return string
  */
 public function getRedirectUrl(array $customServiceParameters = null, Token\Request $token = null, Http\UserAuthorization $redirect = null)
 {
     if ($redirect === null) {
         $redirect = new Http\UserAuthorization($this, $customServiceParameters);
     } elseif ($customServiceParameters !== null) {
         $redirect->setParameters($customServiceParameters);
     }
     if ($token !== null) {
         $this->_requestToken = $token;
     }
     return $redirect->getUrl();
 }